From 37e19cb69dbb2a477cbe7689a56ebcc2d75a71a5 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:00:03 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 77 +- .../main/resources/graphql/schema.graphqls | 338 ++++++++ ...eyByStoreKeyProductProjectionsByIDGet.java | 2 +- ...StoreKeyProductProjectionsKeyByKeyGet.java | 2 +- ...StoreKeyByStoreKeyProductTailoringGet.java | 698 +++++++++++++++++ ...toreKeyByStoreKeyProductTailoringPost.java | 238 ++++++ ...yByStoreKeyProductTailoringPostString.java | 239 ++++++ ...toreKeyProductTailoringRequestBuilder.java | 44 ++ ...uctsByProductIDProductTailoringDelete.java | 330 ++++++++ ...roductsByProductIDProductTailoringGet.java | 236 ++++++ ...oductsByProductIDProductTailoringPost.java | 261 +++++++ ...ByProductIDProductTailoringPostString.java | 261 +++++++ ...oductIDProductTailoringRequestBuilder.java | 56 ++ ...eKeyProductsByProductIDRequestBuilder.java | 28 + ...KeyByProductKeyProductTailoringDelete.java | 330 ++++++++ ...ctsKeyByProductKeyProductTailoringGet.java | 236 ++++++ ...tsKeyByProductKeyProductTailoringPost.java | 261 +++++++ ...yProductKeyProductTailoringPostString.java | 261 +++++++ ...ductKeyProductTailoringRequestBuilder.java | 58 ++ ...ProductsKeyByProductKeyRequestBuilder.java | 28 + ...reKeyByStoreKeyProductsRequestBuilder.java | 31 + ...KeyInStoreKeyByStoreKeyRequestBuilder.java | 8 + ...yProjectKeyProductTailoringByIDDelete.java | 294 +++++++ .../ByProjectKeyProductTailoringByIDGet.java | 208 +++++ .../ByProjectKeyProductTailoringByIDPost.java | 231 ++++++ ...jectKeyProductTailoringByIDPostString.java | 230 ++++++ ...KeyProductTailoringByIDRequestBuilder.java | 49 ++ .../ByProjectKeyProductTailoringGet.java | 669 ++++++++++++++++ ...jectKeyProductTailoringKeyByKeyDelete.java | 295 +++++++ ...ProjectKeyProductTailoringKeyByKeyGet.java | 208 +++++ ...rojectKeyProductTailoringKeyByKeyPost.java | 231 ++++++ ...KeyProductTailoringKeyByKeyPostString.java | 230 ++++++ ...roductTailoringKeyByKeyRequestBuilder.java | 50 ++ .../ByProjectKeyProductTailoringPost.java | 217 ++++++ ...yProjectKeyProductTailoringPostString.java | 216 ++++++ ...jectKeyProductTailoringRequestBuilder.java | 46 ++ .../client/ByProjectKeyRequestBuilder.java | 4 + .../models/cart/ProductTailoringUpdate.java | 155 ++++ .../cart/ProductTailoringUpdateBuilder.java | 168 ++++ .../cart/ProductTailoringUpdateImpl.java | 104 +++ .../api/models/common/BaseResource.java | 4 + .../api/models/common/Reference.java | 14 + .../api/models/common/ReferenceBuilder.java | 4 + .../api/models/common/ReferenceTypeId.java | 8 + .../api/models/common/ResourceIdentifier.java | 14 + .../common/ResourceIdentifierBuilder.java | 4 + .../api/models/message/Message.java | 91 +++ .../api/models/message/MessageBuilder.java | 28 + .../api/models/message/MessagePayload.java | 91 +++ .../models/message/MessagePayloadBuilder.java | 28 + .../ProductTailoringCreatedMessage.java | 283 +++++++ ...ProductTailoringCreatedMessageBuilder.java | 730 ++++++++++++++++++ .../ProductTailoringCreatedMessageImpl.java | 436 +++++++++++ ...ProductTailoringCreatedMessagePayload.java | 256 ++++++ ...TailoringCreatedMessagePayloadBuilder.java | 388 ++++++++++ ...uctTailoringCreatedMessagePayloadImpl.java | 236 ++++++ .../ProductTailoringDeletedMessage.java | 195 +++++ ...ProductTailoringDeletedMessageBuilder.java | 528 +++++++++++++ .../ProductTailoringDeletedMessageImpl.java | 336 ++++++++ ...ProductTailoringDeletedMessagePayload.java | 168 ++++ ...TailoringDeletedMessagePayloadBuilder.java | 186 +++++ ...uctTailoringDeletedMessagePayloadImpl.java | 133 ++++ ...ProductTailoringDescriptionSetMessage.java | 234 ++++++ ...TailoringDescriptionSetMessageBuilder.java | 634 +++++++++++++++ ...uctTailoringDescriptionSetMessageImpl.java | 377 +++++++++ ...TailoringDescriptionSetMessagePayload.java | 207 +++++ ...ngDescriptionSetMessagePayloadBuilder.java | 289 +++++++ ...oringDescriptionSetMessagePayloadImpl.java | 178 +++++ .../ProductTailoringNameSetMessage.java | 230 ++++++ ...ProductTailoringNameSetMessageBuilder.java | 630 +++++++++++++++ .../ProductTailoringNameSetMessageImpl.java | 376 +++++++++ ...ProductTailoringNameSetMessagePayload.java | 203 +++++ ...TailoringNameSetMessagePayloadBuilder.java | 286 +++++++ ...uctTailoringNameSetMessagePayloadImpl.java | 177 +++++ .../ProductTailoringPublishedMessage.java | 195 +++++ ...oductTailoringPublishedMessageBuilder.java | 531 +++++++++++++ .../ProductTailoringPublishedMessageImpl.java | 337 ++++++++ ...oductTailoringPublishedMessagePayload.java | 169 ++++ ...iloringPublishedMessagePayloadBuilder.java | 187 +++++ ...tTailoringPublishedMessagePayloadImpl.java | 133 ++++ .../ProductTailoringSlugSetMessage.java | 230 ++++++ ...ProductTailoringSlugSetMessageBuilder.java | 630 +++++++++++++++ .../ProductTailoringSlugSetMessageImpl.java | 376 +++++++++ ...ProductTailoringSlugSetMessagePayload.java | 203 +++++ ...TailoringSlugSetMessagePayloadBuilder.java | 286 +++++++ ...uctTailoringSlugSetMessagePayloadImpl.java | 177 +++++ .../ProductTailoringUnpublishedMessage.java | 196 +++++ ...uctTailoringUnpublishedMessageBuilder.java | 533 +++++++++++++ ...roductTailoringUnpublishedMessageImpl.java | 337 ++++++++ ...uctTailoringUnpublishedMessagePayload.java | 170 ++++ ...oringUnpublishedMessagePayloadBuilder.java | 187 +++++ ...ailoringUnpublishedMessagePayloadImpl.java | 134 ++++ .../product_tailoring/ProductTailoring.java | 348 +++++++++ .../ProductTailoringBuilder.java | 536 +++++++++++++ .../ProductTailoringData.java | 209 +++++ .../ProductTailoringDataBuilder.java | 358 +++++++++ .../ProductTailoringDataImpl.java | 180 +++++ .../ProductTailoringDraft.java | 285 +++++++ .../ProductTailoringDraftBuilder.java | 510 ++++++++++++ .../ProductTailoringDraftImpl.java | 260 +++++++ .../ProductTailoringImpl.java | 319 ++++++++ .../ProductTailoringInStoreDraft.java | 265 +++++++ .../ProductTailoringInStoreDraftBuilder.java | 463 +++++++++++ .../ProductTailoringInStoreDraftImpl.java | 240 ++++++ .../ProductTailoringPagedQueryResponse.java | 208 +++++ ...uctTailoringPagedQueryResponseBuilder.java | 265 +++++++ ...roductTailoringPagedQueryResponseImpl.java | 164 ++++ .../ProductTailoringPublishAction.java | 107 +++ .../ProductTailoringPublishActionBuilder.java | 57 ++ .../ProductTailoringPublishActionImpl.java | 65 ++ .../ProductTailoringReference.java | 145 ++++ .../ProductTailoringReferenceBuilder.java | 135 ++++ .../ProductTailoringReferenceImpl.java | 114 +++ .../ProductTailoringResourceIdentifier.java | 143 ++++ ...uctTailoringResourceIdentifierBuilder.java | 109 +++ ...roductTailoringResourceIdentifierImpl.java | 113 +++ .../ProductTailoringSetDescriptionAction.java | 146 ++++ ...tTailoringSetDescriptionActionBuilder.java | 135 ++++ ...ductTailoringSetDescriptionActionImpl.java | 114 +++ ...oductTailoringSetMetaAttributesAction.java | 182 +++++ ...iloringSetMetaAttributesActionBuilder.java | 237 ++++++ ...tTailoringSetMetaAttributesActionImpl.java | 157 ++++ ...ductTailoringSetMetaDescriptionAction.java | 147 ++++ ...loringSetMetaDescriptionActionBuilder.java | 137 ++++ ...TailoringSetMetaDescriptionActionImpl.java | 115 +++ ...ProductTailoringSetMetaKeywordsAction.java | 146 ++++ ...TailoringSetMetaKeywordsActionBuilder.java | 136 ++++ ...uctTailoringSetMetaKeywordsActionImpl.java | 114 +++ .../ProductTailoringSetMetaTitleAction.java | 144 ++++ ...uctTailoringSetMetaTitleActionBuilder.java | 135 ++++ ...roductTailoringSetMetaTitleActionImpl.java | 114 +++ .../ProductTailoringSetNameAction.java | 143 ++++ .../ProductTailoringSetNameActionBuilder.java | 135 ++++ .../ProductTailoringSetNameActionImpl.java | 114 +++ .../ProductTailoringSetSlugAction.java | 143 ++++ .../ProductTailoringSetSlugActionBuilder.java | 135 ++++ .../ProductTailoringSetSlugActionImpl.java | 114 +++ .../ProductTailoringUnpublishAction.java | 107 +++ ...roductTailoringUnpublishActionBuilder.java | 57 ++ .../ProductTailoringUnpublishActionImpl.java | 65 ++ .../ProductTailoringUpdateAction.java | 195 +++++ .../ProductTailoringUpdateActionBuilder.java | 58 ++ .../ProductTailoringUpdateActionImpl.java | 72 ++ ...ProductTailoringUpdateQueryBuilderDsl.java | 37 + .../common/BaseResourceQueryBuilderDsl.java | 7 + .../common/ReferenceQueryBuilderDsl.java | 8 + .../ResourceIdentifierQueryBuilderDsl.java | 8 + .../MessagePayloadQueryBuilderDsl.java | 51 ++ .../query/message/MessageQueryBuilderDsl.java | 51 ++ ...gCreatedMessagePayloadQueryBuilderDsl.java | 82 ++ ...ailoringCreatedMessageQueryBuilderDsl.java | 154 ++++ ...gDeletedMessagePayloadQueryBuilderDsl.java | 44 ++ ...ailoringDeletedMessageQueryBuilderDsl.java | 116 +++ ...ptionSetMessagePayloadQueryBuilderDsl.java | 62 ++ ...gDescriptionSetMessageQueryBuilderDsl.java | 134 ++++ ...gNameSetMessagePayloadQueryBuilderDsl.java | 62 ++ ...ailoringNameSetMessageQueryBuilderDsl.java | 134 ++++ ...ublishedMessagePayloadQueryBuilderDsl.java | 44 ++ ...loringPublishedMessageQueryBuilderDsl.java | 116 +++ ...gSlugSetMessagePayloadQueryBuilderDsl.java | 62 ++ ...ailoringSlugSetMessageQueryBuilderDsl.java | 134 ++++ ...ublishedMessagePayloadQueryBuilderDsl.java | 44 ++ ...ringUnpublishedMessageQueryBuilderDsl.java | 116 +++ .../ProductTailoringDataQueryBuilderDsl.java | 70 ++ .../ProductTailoringDraftQueryBuilderDsl.java | 101 +++ ...tTailoringInStoreDraftQueryBuilderDsl.java | 91 +++ ...ringPagedQueryResponseQueryBuilderDsl.java | 52 ++ ...TailoringPublishActionQueryBuilderDsl.java | 20 + .../ProductTailoringQueryBuilderDsl.java | 108 +++ ...ductTailoringReferenceQueryBuilderDsl.java | 37 + ...ringResourceIdentifierQueryBuilderDsl.java | 30 + ...ngSetDescriptionActionQueryBuilderDsl.java | 37 + ...etMetaAttributesActionQueryBuilderDsl.java | 55 ++ ...tMetaDescriptionActionQueryBuilderDsl.java | 37 + ...gSetMetaKeywordsActionQueryBuilderDsl.java | 37 + ...ringSetMetaTitleActionQueryBuilderDsl.java | 37 + ...TailoringSetNameActionQueryBuilderDsl.java | 37 + ...TailoringSetSlugActionQueryBuilderDsl.java | 37 + ...iloringUnpublishActionQueryBuilderDsl.java | 20 + ...tTailoringUpdateActionQueryBuilderDsl.java | 90 +++ ...toreKeyByStoreKeyProductTailoringTest.java | 200 +++++ ...oductsByProductIDProductTailoringTest.java | 192 +++++ ...eKeyByStoreKeyProductsByProductIDTest.java | 35 + ...tsKeyByProductKeyProductTailoringTest.java | 192 +++++ ...ByStoreKeyProductsKeyByProductKeyTest.java | 35 + ...ctKeyInStoreKeyByStoreKeyProductsTest.java | 35 + .../ByProjectKeyProductTailoringByIDTest.java | 147 ++++ ...rojectKeyProductTailoringKeyByKeyTest.java | 148 ++++ .../ByProjectKeyProductTailoringTest.java | 141 ++++ .../cart/ProductTailoringUpdateTest.java | 51 ++ ...uctTailoringCreatedMessagePayloadTest.java | 101 +++ .../ProductTailoringCreatedMessageTest.java | 100 +++ ...uctTailoringDeletedMessagePayloadTest.java | 58 ++ .../ProductTailoringDeletedMessageTest.java | 57 ++ ...oringDescriptionSetMessagePayloadTest.java | 79 ++ ...uctTailoringDescriptionSetMessageTest.java | 78 ++ ...uctTailoringNameSetMessagePayloadTest.java | 77 ++ .../ProductTailoringNameSetMessageTest.java | 76 ++ ...tTailoringPublishedMessagePayloadTest.java | 58 ++ .../ProductTailoringPublishedMessageTest.java | 57 ++ ...uctTailoringSlugSetMessagePayloadTest.java | 77 ++ .../ProductTailoringSlugSetMessageTest.java | 76 ++ ...ailoringUnpublishedMessagePayloadTest.java | 58 ++ ...roductTailoringUnpublishedMessageTest.java | 58 ++ .../ProductTailoringDataTest.java | 87 +++ .../ProductTailoringDraftTest.java | 122 +++ .../ProductTailoringInStoreDraftTest.java | 112 +++ ...roductTailoringPagedQueryResponseTest.java | 76 ++ .../ProductTailoringPublishActionTest.java | 13 + .../ProductTailoringReferenceTest.java | 46 ++ ...roductTailoringResourceIdentifierTest.java | 45 ++ ...ductTailoringSetDescriptionActionTest.java | 48 ++ ...tTailoringSetMetaAttributesActionTest.java | 68 ++ ...TailoringSetMetaDescriptionActionTest.java | 48 ++ ...uctTailoringSetMetaKeywordsActionTest.java | 48 ++ ...roductTailoringSetMetaTitleActionTest.java | 48 ++ .../ProductTailoringSetNameActionTest.java | 46 ++ .../ProductTailoringSetSlugActionTest.java | 46 ++ .../ProductTailoringTest.java | 145 ++++ .../ProductTailoringUnpublishActionTest.java | 13 + references.txt | 1 + 221 files changed, 35259 insertions(+), 17 deletions(-) create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDDelete.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyDelete.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdate.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoring.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponse.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReference.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifier.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/ProductTailoringUpdateQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPagedQueryResponseQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPublishActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringReferenceQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringResourceIdentifierQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetDescriptionActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaAttributesActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaDescriptionActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaKeywordsActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaTitleActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetNameActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetSlugActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUnpublishActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringByIDTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringKeyByKeyTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionTest.java diff --git a/changes.md b/changes.md index aa8cd10ff7e..02a75726e51 100644 --- a/changes.md +++ b/changes.md @@ -3,34 +3,81 @@
Added Type(s) -- added type `DiscountedLineItemPortionDraft` +- added type `ProductTailoringCreatedMessage` +- added type `ProductTailoringDeletedMessage` +- added type `ProductTailoringDescriptionSetMessage` +- added type `ProductTailoringNameSetMessage` +- added type `ProductTailoringPublishedMessage` +- added type `ProductTailoringSlugSetMessage` +- added type `ProductTailoringUnpublishedMessage` +- added type `ProductTailoringCreatedMessagePayload` +- added type `ProductTailoringDeletedMessagePayload` +- added type `ProductTailoringDescriptionSetMessagePayload` +- added type `ProductTailoringNameSetMessagePayload` +- added type `ProductTailoringPublishedMessagePayload` +- added type `ProductTailoringSlugSetMessagePayload` +- added type `ProductTailoringUnpublishedMessagePayload` +- added type `ProductTailoring` +- added type `ProductTailoringData` +- added type `ProductTailoringDraft` +- added type `ProductTailoringInStoreDraft` +- added type `ProductTailoringPagedQueryResponse` +- added type `ProductTailoringReference` +- added type `ProductTailoringResourceIdentifier` +- added type `ProductTailoringUpdate` +- added type `ProductTailoringUpdateAction` +- added type `ProductTailoringPublishAction` +- added type `ProductTailoringSetDescriptionAction` +- added type `ProductTailoringSetMetaAttributesAction` +- added type `ProductTailoringSetMetaDescriptionAction` +- added type `ProductTailoringSetMetaKeywordsAction` +- added type `ProductTailoringSetMetaTitleAction` +- added type `ProductTailoringSetNameAction` +- added type `ProductTailoringSetSlugAction` +- added type `ProductTailoringUnpublishAction`
-Required Property(s) - -- :warning: changed property `isOnStock` of type `ProductVariantAvailability` to be required -- changed property `priceMode` of type `CustomLineItemDraft` to be optional -- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessage` to be optional -- changed property `oldOrderState` of type `OrderStateChangedMessage` to be optional -- changed property `oldShipmentState` of type `OrderShipmentStateChangedMessagePayload` to be optional -- changed property `oldOrderState` of type `OrderStateChangedMessagePayload` to be optional +Added Method(s) + +- added method `apiRoot.withProjectKey().productTailoring().get()` +- added method `apiRoot.withProjectKey().productTailoring().post()` +- added method `apiRoot.withProjectKey().productTailoring().withKey().get()` +- added method `apiRoot.withProjectKey().productTailoring().withKey().post()` +- added method `apiRoot.withProjectKey().productTailoring().withKey().delete()` +- added method `apiRoot.withProjectKey().productTailoring().withId().get()` +- added method `apiRoot.withProjectKey().productTailoring().withId().post()` +- added method `apiRoot.withProjectKey().productTailoring().withId().delete()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().delete()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().delete()`
-Changed Property(s) +Added Enum(s) -- :warning: changed property `includedDiscounts` of type `DiscountedLineItemPriceDraft` from type `DiscountedLineItemPortion[]` to `DiscountedLineItemPortionDraft[]` +- added enum `product-tailoring` to type `ReferenceTypeId`
-Added Property(s) +Added Resource(s) -- added property `totalTax` to type `TaxedPriceDraft` -- added property `id` to type `ProductVariantAvailability` -- added property `version` to type `ProductVariantAvailability` +- added resource `/{projectKey}/product-tailoring` +- added resource `/{projectKey}/product-tailoring/key={key}` +- added resource `/{projectKey}/product-tailoring/{ID}` +- added resource `/{projectKey}/in-store/key={storeKey}/product-tailoring` +- added resource `/{projectKey}/in-store/key={storeKey}/products` +- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}` +- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}` +- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring` +- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring`
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 579acf6a69a..678822a9289 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -2978,6 +2978,19 @@ input CreateProductSelectionDraft { custom: CustomFieldsDraft } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input CreateProductTailoringDraft { + product: ResourceIdentifierInput! + name: [LocalizedStringItemInputType!] + key: String + description: [LocalizedStringItemInputType!] + slug: [LocalizedStringItemInputType!] + metaTitle: [LocalizedStringItemInputType!] + metaDescription: [LocalizedStringItemInputType!] + metaKeywords: [LocalizedStringItemInputType!] + publish: Boolean +} + input CreateStandalonePrice { key: String sku: String! @@ -4555,6 +4568,23 @@ type InStore implements CartDiscountQueryInterface & CartQueryInterface & Custom key: String): ShoppingList shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productTailoring( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, + + "Queries with specified Product ID" + productId: String, + + "Queries with specified Product key" + productKey: String): ProductTailoring + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productTailoringList(where: String, sort: [String!], limit: Int, offset: Int): ProductTailoringQueryResult! } type InStoreMe implements MeQueryInterface & CartQueryInterface & ActiveCartInterface & OrderQueryInterface & ShoppingListQueryInterface { @@ -5907,6 +5937,47 @@ type Mutation { "Queries with specified key" key: String): ProductSelection + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createProductTailoring( + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, draft: CreateProductTailoringDraft!): ProductTailoring + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateProductTailoring( + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified Product ID" + productId: String, + + "Queries with specified Product key" + productKey: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, + + actions: [ProductTailoringUpdateAction!]!, version: Long!): ProductTailoring + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteProductTailoring( + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + + "Queries with specified Product ID" + productId: String, + + "Queries with specified Product key" + productKey: String, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, version: Long!): ProductTailoring updateProject(version: Long!, actions: [ProjectSettingsUpdateAction!]!): ProjectProjection createStore(draft: CreateStore!): Store updateStore(version: Long!, actions: [StoreUpdateAction!]!, @@ -8077,6 +8148,208 @@ type ProductStateTransition 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 ProductTailoring implements Versioned { + key: String + productRef: Reference! + product: Product + storeRef: KeyReference! + store: Store + current: ProductTailoringData + staged: ProductTailoringData + published: Boolean! + hasStagedChanges: Boolean! + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +type ProductTailoringCreated implements MessagePayload { + publish: Boolean! + storeRef: KeyReference! + productRef: Reference! + key: String + productKey: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + slugAllLocales: [LocalizedString!] + descriptionAllLocales: [LocalizedString!] + 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 ProductTailoringData { + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!] + metaTitle( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaTitleAllLocales: [LocalizedString!] + metaDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaDescriptionAllLocales: [LocalizedString!] + metaKeywords( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + metaKeywordsAllLocales: [LocalizedString!] +} + +type ProductTailoringDeleted implements MessagePayload { + storeRef: KeyReference! + productRef: Reference! + productKey: String + type: String! +} + +type ProductTailoringDescriptionSet implements MessagePayload { + storeRef: KeyReference! + productRef: Reference! + productKey: String + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + oldDescription( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + oldDescriptionAllLocales: [LocalizedString!] + type: String! +} + +type ProductTailoringNameSet implements MessagePayload { + storeRef: KeyReference! + productRef: Reference! + productKey: String + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + oldName( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + oldNameAllLocales: [LocalizedString!] + type: String! +} + +type ProductTailoringPublished implements MessagePayload { + storeRef: KeyReference! + productRef: Reference! + productKey: String + type: String! +} + +type ProductTailoringQueryResult { + offset: Int! + count: Int! + total: Long! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + exists: Boolean! + results: [ProductTailoring!]! +} + +type ProductTailoringSlugSet implements MessagePayload { + storeRef: KeyReference! + productRef: Reference! + productKey: String + slug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + oldSlug( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + slugAllLocales: [LocalizedString!] + oldSlugAllLocales: [LocalizedString!] + type: String! +} + +type ProductTailoringUnpublished implements MessagePayload { + 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 ProductTailoringUpdateAction { + publish: PublishTailoring + unpublish: UnpublishTailoring + setDescription: SetProductTailoringDescription + setMetaAttributes: SetProductTailoringMetaAttributes + setMetaDescription: SetProductTailoringMetaDescription + setMetaKeywords: SetProductTailoringMetaKeywords + setMetaTitle: SetProductTailoringMetaTitle + setName: SetProductTailoringName + setSlug: SetProductTailoringSlug +} + type ProductTypeDefinition implements Versioned & ReferenceExpandable { key: String name: String! @@ -8407,6 +8680,10 @@ enum PublishScope { Prices } +input PublishTailoring { + dummy: String +} + type PurchaseOrderNumberSet implements MessagePayload & OrderMessagePayload { purchaseOrderNumber: String oldPurchaseOrderNumber: String @@ -8608,6 +8885,26 @@ type Query { "Queries with specified key" key: String): ProductSelection productSelections(where: String, sort: [String!], limit: Int, offset: Int): ProductSelectionQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productTailoring( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String, + + "Queries with specified Product ID" + productId: String, + + "Queries with specified Product key" + productKey: String, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): ProductTailoring + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + productTailoringList(where: String, sort: [String!], limit: Int, offset: Int): ProductTailoringQueryResult! productProjectionsSuggest(searchKeywords: [SearchKeywordArgument!]!, fuzzy: Boolean, limit: Int = 10, staged: Boolean = false): SuggestResult! project: ProjectProjection! store( @@ -11166,6 +11463,43 @@ input SetProductSku { staged: Boolean = true } +input SetProductTailoringDescription { + description: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringMetaAttributes { + metaDescription: [LocalizedStringItemInputType!] + metaKeywords: [LocalizedStringItemInputType!] + metaTitle: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringMetaDescription { + metaDescription: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringMetaKeywords { + metaKeywords: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringMetaTitle { + metaTitle: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringName { + name: [LocalizedStringItemInputType!] + staged: Boolean = true +} + +input SetProductTailoringSlug { + slug: [LocalizedStringItemInputType!] + staged: Boolean = true +} + input SetProductTaxCategory { taxCategory: ResourceIdentifierInput } @@ -13849,6 +14183,10 @@ input UnpublishProduct { dummy: String } +input UnpublishTailoring { + dummy: String +} + input UpdateCartItemShippingAddress { address: AddressInput! } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java index 9acee87b615..61d42d0856e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

Gets the current or staged representation of a Product by its ID from the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.

+ *

Gets the current or staged representation of a Product by its ID in the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.

*

If ProductSelection is used, it affects the availability of the Product in the specified Store.

*

When used with an API Client that has the view_published_products:{projectKey} scope, this endpoint only returns published (current) Product Projections.

* diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java index dcefbea0ee0..e0c358c47af 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

Gets the current or staged representation of a Product by its key from the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.

+ *

Gets the current or staged representation of a Product by its key in the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.

*

If ProductSelection is used, it affects the availability of the Product in the specified Store.

*

When used with an API Client that has the view_published_products:{projectKey} scope, this endpoint only returns published (current) Product Projections.

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

Queries Product Tailoring in a specific Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .productTailoring()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.QueryTrait, + com.commercetools.api.client.SortableTrait, + com.commercetools.api.client.PagingTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet(ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/product-tailoring", this.projectKey, this.storeKey); + 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.product_tailoring.ProductTailoringPagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoringPagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withLimit( + final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addLimit( + final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withOffset( + final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addOffset( + final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWithTotal( + final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWithTotal( + final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWithTotal( + final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWithTotal( + final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWhere( + final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWhere( + final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withSort( + final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addSort( + final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set predicateVar with the specificied value + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withPredicateVar(final String varName, + final TValue predicateVar) { + return copy().withQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * add additional predicateVar query parameter + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addPredicateVar(final String varName, + final TValue predicateVar) { + return copy().addQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * set predicateVar with the specificied values + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet withPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().withoutQueryParam(placeholderName) + .addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional predicateVar query parameters + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet addPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet that = (ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(storeKey, that.storeKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost.java new file mode 100644 index 00000000000..f728a09a043 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost.java @@ -0,0 +1,238 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Creates a ProductTailoring in the Store specified by storeKey. When using this endpoint the ProductTailoring's store field is always set to the Store specified in the path parameter.

+ *

Generates the ProductTailoringCreated Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .productTailoring()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + + private com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft productTailoringInStoreDraft; + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey, + com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft productTailoringInStoreDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productTailoringInStoreDraft = productTailoringInStoreDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost( + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productTailoringInStoreDraft = t.productTailoringInStoreDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/product-tailoring", this.projectKey, this.storeKey); + 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(productTailoringInStoreDraft))); + + } + + @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 List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft getBody() { + return productTailoringInStoreDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost withBody( + com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft productTailoringInStoreDraft) { + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost t = copy(); + t.productTailoringInStoreDraft = productTailoringInStoreDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost that = (ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productTailoringInStoreDraft, that.productTailoringInStoreDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productTailoringInStoreDraft) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString.java new file mode 100644 index 00000000000..6ba92cb4606 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString.java @@ -0,0 +1,239 @@ + +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; + +/** + *

Creates a ProductTailoring in the Store specified by storeKey. When using this endpoint the ProductTailoring's store field is always set to the Store specified in the path parameter.

+ *

Generates the ProductTailoringCreated Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .productTailoring()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString extends + StringBodyApiMethod + implements + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + + private String productTailoringInStoreDraft; + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String productTailoringInStoreDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productTailoringInStoreDraft = productTailoringInStoreDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString( + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productTailoringInStoreDraft = t.productTailoringInStoreDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/product-tailoring", this.projectKey, this.storeKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringInStoreDraft.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 List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringInStoreDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString withBody(String productTailoringInStoreDraft) { + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString t = copy(); + t.productTailoringInStoreDraft = productTailoringInStoreDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString that = (ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productTailoringInStoreDraft, that.productTailoringInStoreDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productTailoringInStoreDraft) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder.java new file mode 100644 index 00000000000..d2ac1eb1d0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder.java @@ -0,0 +1,44 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String storeKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringGet(apiHttpClient, projectKey, storeKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost post( + com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft productTailoringInStoreDraft) { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost(apiHttpClient, projectKey, storeKey, + productTailoringInStoreDraft); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString post(final String productTailoringInStoreDraft) { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringPostString(apiHttpClient, projectKey, storeKey, + productTailoringInStoreDraft); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraftBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete.java new file mode 100644 index 00000000000..1e5670f800b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete.java @@ -0,0 +1,330 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Generates the ProductTailoringDeleted Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete extends + TypeApiMethod + implements + com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String productID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring", this.projectKey, + this.storeKey, this.productID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getVersion() { + return this.getQueryParam("version"); + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + 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 version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withVersion( + final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addVersion( + final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withVersion( + final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addVersion( + final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withVersion( + final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addVersion( + final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withVersion( + final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addVersion( + final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(productID).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet.java new file mode 100644 index 00000000000..307c8386889 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet.java @@ -0,0 +1,236 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Gets the current or staged representation of a Product Tailoring by its Product ID in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet extends + TypeApiMethod + implements + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String productID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring", this.projectKey, + this.storeKey, this.productID); + 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.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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(productID).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost.java new file mode 100644 index 00000000000..30ff17caf15 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost.java @@ -0,0 +1,261 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Updates the current or staged representation of a Product Tailoring by its Product ID in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost extends + TypeBodyApiMethod + implements + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + private com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String productID, + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring", this.projectKey, + this.storeKey, this.productID); + 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(productTailoringUpdate))); + + } + + @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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.cart.ProductTailoringUpdate getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost withBody( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productID) + .append(productTailoringUpdate) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString.java new file mode 100644 index 00000000000..d4c3b0b5f7d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString.java @@ -0,0 +1,261 @@ + +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; + +/** + *

Updates the current or staged representation of a Product Tailoring by its Product ID in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString extends + StringBodyApiMethod + implements + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + private String productTailoringUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productID, + String productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring", this.projectKey, + this.storeKey, this.productID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringUpdate.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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString withBody( + String productTailoringUpdate) { + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productID) + .append(productTailoringUpdate) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString(this); + } +} 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 new file mode 100644 index 00000000000..92225e0f9ec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java @@ -0,0 +1,56 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productID; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder( + 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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringGet(apiHttpClient, projectKey, + storeKey, productID); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost post( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost(apiHttpClient, projectKey, + storeKey, productID, productTailoringUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString post( + final String productTailoringUpdate) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPostString(apiHttpClient, + projectKey, storeKey, productID, productTailoringUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.ProductTailoringUpdateBuilder.of()).build()); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete delete() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete(apiHttpClient, projectKey, + storeKey, productID); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder.java new file mode 100644 index 00000000000..aeccb3d43e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder.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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productID; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder(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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder productTailoring() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder(apiHttpClient, + projectKey, storeKey, productID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete.java new file mode 100644 index 00000000000..8bf5f530ca8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete.java @@ -0,0 +1,330 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Generates the ProductTailoringDeleted Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete extends + TypeApiMethod + implements + com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productKey) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring", this.projectKey, + this.storeKey, this.productKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getVersion() { + return this.getQueryParam("version"); + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + 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 version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withVersion( + final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addVersion( + final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withVersion( + final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addVersion( + final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withVersion( + final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addVersion( + final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withVersion( + final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addVersion( + final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(productKey).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet.java new file mode 100644 index 00000000000..c2068d3c13e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet.java @@ -0,0 +1,236 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Gets the current or staged representation of a Product Tailoring by its Product key in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet extends + TypeApiMethod + implements + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String productKey) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring", this.projectKey, + this.storeKey, this.productKey); + 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.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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(productKey).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost.java new file mode 100644 index 00000000000..f059ac413eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost.java @@ -0,0 +1,261 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Updates the current or staged representation of a Product Tailoring by its Product key in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost extends + TypeBodyApiMethod + implements + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + private com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productKey, + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring", this.projectKey, + this.storeKey, this.productKey); + 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(productTailoringUpdate))); + + } + + @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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.cart.ProductTailoringUpdate getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost withBody( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productKey) + .append(productTailoringUpdate) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString.java new file mode 100644 index 00000000000..a8752ac6c6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString.java @@ -0,0 +1,261 @@ + +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; + +/** + *

Updates the current or staged representation of a Product Tailoring by its Product key in the specified Store.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString extends + StringBodyApiMethod + implements + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + private String productTailoringUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productKey, + String productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring", this.projectKey, + this.storeKey, this.productKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringUpdate.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 getExpand() { + return this.getQueryParam("expand"); + } + + 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 expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString withExpand( + final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString addExpand( + final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString withExpand( + final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString addExpand( + final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString addExpand( + final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString withExpand( + final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString addExpand( + final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString withBody( + String productTailoringUpdate) { + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productKey) + .append(productTailoringUpdate) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString(this); + } +} 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 new file mode 100644 index 00000000000..b379724fc36 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java @@ -0,0 +1,58 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder( + 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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringGet(apiHttpClient, projectKey, + storeKey, productKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost post( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost(apiHttpClient, + projectKey, storeKey, productKey, productTailoringUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString post( + final String productTailoringUpdate) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPostString(apiHttpClient, + projectKey, storeKey, productKey, productTailoringUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.ProductTailoringUpdateBuilder.of()).build()); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete delete() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete(apiHttpClient, + projectKey, storeKey, productKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringDelete delete( + TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder.java new file mode 100644 index 00000000000..e81e473a8e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder.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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder(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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder productTailoring() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder(apiHttpClient, + projectKey, storeKey, productKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder.java new file mode 100644 index 00000000000..e0173c5f23b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder.java @@ -0,0 +1,31 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String storeKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder withProductId(String productID) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder(apiHttpClient, projectKey, + storeKey, productID); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder withProductKey(String productKey) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder(apiHttpClient, projectKey, + storeKey, productKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java index d95c1db56da..b23e6f081a7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java @@ -60,4 +60,12 @@ public ByProjectKeyInStoreKeyByStoreKeyCartDiscountsRequestBuilder cartDiscounts return new ByProjectKeyInStoreKeyByStoreKeyCartDiscountsRequestBuilder(apiHttpClient, projectKey, storeKey); } + public ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder productTailoring() { + return new ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder(apiHttpClient, projectKey, storeKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder products() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder(apiHttpClient, projectKey, storeKey); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDDelete.java new file mode 100644 index 00000000000..dbbb8fb659d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDDelete.java @@ -0,0 +1,294 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Generates the ProductTailoringDeleted Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withId("{ID}")
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringByIDDelete extends + TypeApiMethod + implements com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyProductTailoringByIDDelete(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyProductTailoringByIDDelete(ByProjectKeyProductTailoringByIDDelete t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getID() { + return this.ID; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDDelete + */ + public ByProjectKeyProductTailoringByIDDelete addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringByIDDelete that = (ByProjectKeyProductTailoringByIDDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringByIDDelete copy() { + return new ByProjectKeyProductTailoringByIDDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDGet.java new file mode 100644 index 00000000000..66a3686779c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDGet.java @@ -0,0 +1,208 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withId("{ID}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringByIDGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyProductTailoringByIDGet(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyProductTailoringByIDGet(ByProjectKeyProductTailoringByIDGet t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDGet + */ + public ByProjectKeyProductTailoringByIDGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringByIDGet that = (ByProjectKeyProductTailoringByIDGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringByIDGet copy() { + return new ByProjectKeyProductTailoringByIDGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPost.java new file mode 100644 index 00000000000..08260840b77 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPost.java @@ -0,0 +1,231 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withId("{ID}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringByIDPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate; + + public ByProjectKeyProductTailoringByIDPost(final ApiHttpClient apiHttpClient, String projectKey, String ID, + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyProductTailoringByIDPost(ByProjectKeyProductTailoringByIDPost t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(productTailoringUpdate))); + + } + + @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 getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringByIDPost + */ + public ByProjectKeyProductTailoringByIDPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.cart.ProductTailoringUpdate getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyProductTailoringByIDPost withBody( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + ByProjectKeyProductTailoringByIDPost t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringByIDPost that = (ByProjectKeyProductTailoringByIDPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(productTailoringUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringByIDPost copy() { + return new ByProjectKeyProductTailoringByIDPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPostString.java new file mode 100644 index 00000000000..dbd2678b061 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDPostString.java @@ -0,0 +1,230 @@ + +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; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withId("{ID}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringByIDPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private String productTailoringUpdate; + + public ByProjectKeyProductTailoringByIDPostString(final ApiHttpClient apiHttpClient, String projectKey, String ID, + String productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyProductTailoringByIDPostString(ByProjectKeyProductTailoringByIDPostString t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringUpdate.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 getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyProductTailoringByIDPostString + */ + public ByProjectKeyProductTailoringByIDPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyProductTailoringByIDPostString withBody(String productTailoringUpdate) { + ByProjectKeyProductTailoringByIDPostString t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringByIDPostString that = (ByProjectKeyProductTailoringByIDPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(productTailoringUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringByIDPostString copy() { + return new ByProjectKeyProductTailoringByIDPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDRequestBuilder.java new file mode 100644 index 00000000000..3ed64544012 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringByIDRequestBuilder.java @@ -0,0 +1,49 @@ + +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 ByProjectKeyProductTailoringByIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String ID; + + public ByProjectKeyProductTailoringByIDRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String ID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyProductTailoringByIDGet get() { + return new ByProjectKeyProductTailoringByIDGet(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyProductTailoringByIDPost post( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + return new ByProjectKeyProductTailoringByIDPost(apiHttpClient, projectKey, ID, productTailoringUpdate); + } + + public ByProjectKeyProductTailoringByIDPostString post(final String productTailoringUpdate) { + return new ByProjectKeyProductTailoringByIDPostString(apiHttpClient, projectKey, ID, productTailoringUpdate); + } + + public ByProjectKeyProductTailoringByIDPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.ProductTailoringUpdateBuilder.of()).build()); + } + + public ByProjectKeyProductTailoringByIDDelete delete() { + return new ByProjectKeyProductTailoringByIDDelete(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyProductTailoringByIDDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringGet.java new file mode 100644 index 00000000000..a1d18dfccd9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringGet.java @@ -0,0 +1,669 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.SortableTrait, + com.commercetools.api.client.PagingTrait, + com.commercetools.api.client.QueryTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyProductTailoringGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyProductTailoringGet(ByProjectKeyProductTailoringGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring", 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.product_tailoring.ProductTailoringPagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoringPagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withSort(final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addSort(final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withLimit(final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addLimit(final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withOffset(final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addOffset(final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWithTotal(final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWithTotal(final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWithTotal(final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * set predicateVar with the specificied value + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withPredicateVar(final String varName, final TValue predicateVar) { + return copy().withQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * add additional predicateVar query parameter + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addPredicateVar(final String varName, final TValue predicateVar) { + return copy().addQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * set predicateVar with the specificied values + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet withPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().withoutQueryParam(placeholderName) + .addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional predicateVar query parameters + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyProductTailoringGet + */ + public ByProjectKeyProductTailoringGet addPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringGet that = (ByProjectKeyProductTailoringGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringGet copy() { + return new ByProjectKeyProductTailoringGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyDelete.java new file mode 100644 index 00000000000..ea5f27909df --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyDelete.java @@ -0,0 +1,295 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Generates the ProductTailoringDeleted Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withKey("{key}")
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringKeyByKeyDelete extends + TypeApiMethod + implements com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyProductTailoringKeyByKeyDelete(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyProductTailoringKeyByKeyDelete(ByProjectKeyProductTailoringKeyByKeyDelete t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getKey() { + return this.key; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyDelete + */ + public ByProjectKeyProductTailoringKeyByKeyDelete addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringKeyByKeyDelete that = (ByProjectKeyProductTailoringKeyByKeyDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringKeyByKeyDelete copy() { + return new ByProjectKeyProductTailoringKeyByKeyDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyGet.java new file mode 100644 index 00000000000..ce9134364c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyGet.java @@ -0,0 +1,208 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withKey("{key}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringKeyByKeyGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyProductTailoringKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyProductTailoringKeyByKeyGet(ByProjectKeyProductTailoringKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.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 getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyGet + */ + public ByProjectKeyProductTailoringKeyByKeyGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringKeyByKeyGet that = (ByProjectKeyProductTailoringKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringKeyByKeyGet copy() { + return new ByProjectKeyProductTailoringKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPost.java new file mode 100644 index 00000000000..0742b79e485 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPost.java @@ -0,0 +1,231 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withKey("{key}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringKeyByKeyPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate; + + public ByProjectKeyProductTailoringKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyProductTailoringKeyByKeyPost(ByProjectKeyProductTailoringKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(productTailoringUpdate))); + + } + + @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 getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringKeyByKeyPost + */ + public ByProjectKeyProductTailoringKeyByKeyPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.cart.ProductTailoringUpdate getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyProductTailoringKeyByKeyPost withBody( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + ByProjectKeyProductTailoringKeyByKeyPost t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringKeyByKeyPost that = (ByProjectKeyProductTailoringKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(productTailoringUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringKeyByKeyPost copy() { + return new ByProjectKeyProductTailoringKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPostString.java new file mode 100644 index 00000000000..5f49bcfbf5a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyPostString.java @@ -0,0 +1,230 @@ + +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; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .withKey("{key}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringKeyByKeyPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String productTailoringUpdate; + + public ByProjectKeyProductTailoringKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, + String key, String productTailoringUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.productTailoringUpdate = productTailoringUpdate; + } + + public ByProjectKeyProductTailoringKeyByKeyPostString(ByProjectKeyProductTailoringKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.productTailoringUpdate = t.productTailoringUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringUpdate.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 getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyProductTailoringKeyByKeyPostString + */ + public ByProjectKeyProductTailoringKeyByKeyPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringUpdate; + } + + public ByProjectKeyProductTailoringKeyByKeyPostString withBody(String productTailoringUpdate) { + ByProjectKeyProductTailoringKeyByKeyPostString t = copy(); + t.productTailoringUpdate = productTailoringUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringKeyByKeyPostString that = (ByProjectKeyProductTailoringKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(productTailoringUpdate, that.productTailoringUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(productTailoringUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringKeyByKeyPostString copy() { + return new ByProjectKeyProductTailoringKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..555bbe31b0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringKeyByKeyRequestBuilder.java @@ -0,0 +1,50 @@ + +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 ByProjectKeyProductTailoringKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyProductTailoringKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyProductTailoringKeyByKeyGet get() { + return new ByProjectKeyProductTailoringKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyProductTailoringKeyByKeyPost post( + com.commercetools.api.models.cart.ProductTailoringUpdate productTailoringUpdate) { + return new ByProjectKeyProductTailoringKeyByKeyPost(apiHttpClient, projectKey, key, productTailoringUpdate); + } + + public ByProjectKeyProductTailoringKeyByKeyPostString post(final String productTailoringUpdate) { + return new ByProjectKeyProductTailoringKeyByKeyPostString(apiHttpClient, projectKey, key, + productTailoringUpdate); + } + + public ByProjectKeyProductTailoringKeyByKeyPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.ProductTailoringUpdateBuilder.of()).build()); + } + + public ByProjectKeyProductTailoringKeyByKeyDelete delete() { + return new ByProjectKeyProductTailoringKeyByKeyDelete(apiHttpClient, projectKey, key); + } + + public ByProjectKeyProductTailoringKeyByKeyDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPost.java new file mode 100644 index 00000000000..59de21aa5a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPost.java @@ -0,0 +1,217 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Generates the ProductTailoringCreated Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.api.models.product_tailoring.ProductTailoringDraft productTailoringDraft; + + public ByProjectKeyProductTailoringPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.api.models.product_tailoring.ProductTailoringDraft productTailoringDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.productTailoringDraft = productTailoringDraft; + } + + public ByProjectKeyProductTailoringPost(ByProjectKeyProductTailoringPost t) { + super(t); + this.projectKey = t.projectKey; + this.productTailoringDraft = t.productTailoringDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring", 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(productTailoringDraft))); + + } + + @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 List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyProductTailoringPost + */ + public ByProjectKeyProductTailoringPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringDraft getBody() { + return productTailoringDraft; + } + + public ByProjectKeyProductTailoringPost withBody( + com.commercetools.api.models.product_tailoring.ProductTailoringDraft productTailoringDraft) { + ByProjectKeyProductTailoringPost t = copy(); + t.productTailoringDraft = productTailoringDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringPost that = (ByProjectKeyProductTailoringPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(productTailoringDraft, that.productTailoringDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(productTailoringDraft).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringPost copy() { + return new ByProjectKeyProductTailoringPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPostString.java new file mode 100644 index 00000000000..c59d7f0d9dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringPostString.java @@ -0,0 +1,216 @@ + +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; + +/** + *

Generates the ProductTailoringCreated Message.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String productTailoringDraft; + + public ByProjectKeyProductTailoringPostString(final ApiHttpClient apiHttpClient, String projectKey, + String productTailoringDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.productTailoringDraft = productTailoringDraft; + } + + public ByProjectKeyProductTailoringPostString(ByProjectKeyProductTailoringPostString t) { + super(t); + this.projectKey = t.projectKey; + this.productTailoringDraft = t.productTailoringDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + productTailoringDraft.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 List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyProductTailoringPostString + */ + public ByProjectKeyProductTailoringPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return productTailoringDraft; + } + + public ByProjectKeyProductTailoringPostString withBody(String productTailoringDraft) { + ByProjectKeyProductTailoringPostString t = copy(); + t.productTailoringDraft = productTailoringDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringPostString that = (ByProjectKeyProductTailoringPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(productTailoringDraft, that.productTailoringDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(productTailoringDraft).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringPostString copy() { + return new ByProjectKeyProductTailoringPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java new file mode 100644 index 00000000000..f5b128bc55e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java @@ -0,0 +1,46 @@ + +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 ByProjectKeyProductTailoringRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyProductTailoringRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyProductTailoringGet get() { + return new ByProjectKeyProductTailoringGet(apiHttpClient, projectKey); + } + + public ByProjectKeyProductTailoringPost post( + com.commercetools.api.models.product_tailoring.ProductTailoringDraft productTailoringDraft) { + return new ByProjectKeyProductTailoringPost(apiHttpClient, projectKey, productTailoringDraft); + } + + public ByProjectKeyProductTailoringPostString post(final String productTailoringDraft) { + return new ByProjectKeyProductTailoringPostString(apiHttpClient, projectKey, productTailoringDraft); + } + + public ByProjectKeyProductTailoringPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.product_tailoring.ProductTailoringDraftBuilder.of()).build()); + } + + public ByProjectKeyProductTailoringKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyProductTailoringKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + + public ByProjectKeyProductTailoringByIDRequestBuilder withId(String ID) { + return new ByProjectKeyProductTailoringByIDRequestBuilder(apiHttpClient, projectKey, ID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java index d131037626e..1379a2dafed 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java @@ -121,6 +121,10 @@ public ByProjectKeyProductSelectionsRequestBuilder productSelections() { return new ByProjectKeyProductSelectionsRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyProductTailoringRequestBuilder productTailoring() { + return new ByProjectKeyProductTailoringRequestBuilder(apiHttpClient, projectKey); + } + public ByProjectKeyProductTypesRequestBuilder productTypes() { return new ByProjectKeyProductTypesRequestBuilder(apiHttpClient, projectKey); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdate.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdate.java new file mode 100644 index 00000000000..261ab4ea805 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdate.java @@ -0,0 +1,155 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringUpdate + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringUpdate productTailoringUpdate = ProductTailoringUpdate.builder()
+ *             .version(0.3)
+ *             .plusActions(actionsBuilder -> actionsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringUpdateImpl.class) +public interface ProductTailoringUpdate { + + /** + *

Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned.

+ * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

Update actions to be performed on the ProductTailoring.

+ * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned.

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

Update actions to be performed on the ProductTailoring.

+ * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final ProductTailoringUpdateAction... actions); + + /** + *

Update actions to be performed on the ProductTailoring.

+ * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of ProductTailoringUpdate + */ + public static ProductTailoringUpdate of() { + return new ProductTailoringUpdateImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringUpdate + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringUpdate of(final ProductTailoringUpdate template) { + ProductTailoringUpdateImpl instance = new ProductTailoringUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringUpdate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringUpdate deepCopy(@Nullable final ProductTailoringUpdate template) { + if (template == null) { + return null; + } + ProductTailoringUpdateImpl instance = new ProductTailoringUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringUpdate + * @return builder + */ + public static ProductTailoringUpdateBuilder builder() { + return ProductTailoringUpdateBuilder.of(); + } + + /** + * create builder for ProductTailoringUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringUpdateBuilder builder(final ProductTailoringUpdate template) { + return ProductTailoringUpdateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringUpdate(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateBuilder.java new file mode 100644 index 00000000000..a4050d6f2a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateBuilder.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.cart; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringUpdateBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringUpdate productTailoringUpdate = ProductTailoringUpdate.builder()
+ *             .version(0.3)
+ *             .plusActions(actionsBuilder -> actionsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUpdateBuilder implements Builder { + + private Long version; + + private java.util.List actions; + + /** + *

Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned.

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

Update actions to be performed on the ProductTailoring.

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

Update actions to be performed on the ProductTailoring.

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

Update actions to be performed on the ProductTailoring.

+ * @param actions value to be set + * @return Builder + */ + + public ProductTailoringUpdateBuilder plusActions( + final com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

Update actions to be performed on the ProductTailoring.

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

Update actions to be performed on the ProductTailoring.

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

Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned.

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

Update actions to be performed on the ProductTailoring.

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

Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned.

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

Update actions to be performed on the ProductTailoring.

+ */ + + public java.util.List getActions() { + return this.actions; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setActions( + final com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringUpdateImpl that = (ProductTailoringUpdateImpl) o; + + return new EqualsBuilder().append(version, that.version) + .append(actions, that.actions) + .append(version, that.version) + .append(actions, that.actions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(version).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("version", version) + .append("actions", actions) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/BaseResource.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/BaseResource.java index 5d05561e754..4f08933ac89 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/BaseResource.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/BaseResource.java @@ -194,6 +194,10 @@ public static BaseResource deepCopy(@Nullable final BaseResource template) { return com.commercetools.api.models.product_selection.ProductSelection .deepCopy((com.commercetools.api.models.product_selection.ProductSelection) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoring) { + return com.commercetools.api.models.product_tailoring.ProductTailoring + .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoring) template); + } if (template instanceof com.commercetools.api.models.product_type.ProductType) { return com.commercetools.api.models.product_type.ProductType .deepCopy((com.commercetools.api.models.product_type.ProductType) template); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java index b8f4105be06..2650e03a74d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java @@ -29,6 +29,7 @@ import com.commercetools.api.models.product.ProductReference; import com.commercetools.api.models.product_discount.ProductDiscountReference; import com.commercetools.api.models.product_selection.ProductSelectionReference; +import com.commercetools.api.models.product_tailoring.ProductTailoringReference; import com.commercetools.api.models.product_type.ProductTypeReference; import com.commercetools.api.models.quote.QuoteReference; import com.commercetools.api.models.quote_request.QuoteRequestReference; @@ -82,6 +83,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.product_discount.ProductDiscountReferenceImpl.class, name = ProductDiscountReference.PRODUCT_DISCOUNT), @JsonSubTypes.Type(value = com.commercetools.api.models.product.ProductReferenceImpl.class, name = ProductReference.PRODUCT), @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductSelectionReferenceImpl.class, name = ProductSelectionReference.PRODUCT_SELECTION), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringReferenceImpl.class, name = ProductTailoringReference.PRODUCT_TAILORING), @JsonSubTypes.Type(value = com.commercetools.api.models.product_type.ProductTypeReferenceImpl.class, name = ProductTypeReference.PRODUCT_TYPE), @JsonSubTypes.Type(value = com.commercetools.api.models.quote.QuoteReferenceImpl.class, name = QuoteReference.QUOTE), @JsonSubTypes.Type(value = com.commercetools.api.models.quote_request.QuoteRequestReferenceImpl.class, name = QuoteRequestReference.QUOTE_REQUEST), @@ -217,6 +219,10 @@ public static Reference deepCopy(@Nullable final Reference template) { return com.commercetools.api.models.product_selection.ProductSelectionReference .deepCopy((com.commercetools.api.models.product_selection.ProductSelectionReference) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringReference) { + return com.commercetools.api.models.product_tailoring.ProductTailoringReference + .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoringReference) template); + } if (template instanceof com.commercetools.api.models.product_type.ProductTypeReference) { return com.commercetools.api.models.product_type.ProductTypeReference .deepCopy((com.commercetools.api.models.product_type.ProductTypeReference) template); @@ -442,6 +448,14 @@ public static com.commercetools.api.models.product_selection.ProductSelectionRef return com.commercetools.api.models.product_selection.ProductSelectionReferenceBuilder.of(); } + /** + * builder for productTailoring subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringReferenceBuilder productTailoringBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringReferenceBuilder.of(); + } + /** * builder for productType subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java index 2e620292c3d..19ca29929b1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java @@ -95,6 +95,10 @@ public com.commercetools.api.models.product_selection.ProductSelectionReferenceB return com.commercetools.api.models.product_selection.ProductSelectionReferenceBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringReferenceBuilder productTailoringBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringReferenceBuilder.of(); + } + public com.commercetools.api.models.product_type.ProductTypeReferenceBuilder productTypeBuilder() { return com.commercetools.api.models.product_type.ProductTypeReferenceBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java index b8153e99e45..d315f7ac139 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java @@ -92,6 +92,9 @@ public interface ReferenceTypeId extends JsonEnum {

References a ProductSelection.

*/ ReferenceTypeId PRODUCT_SELECTION = ReferenceTypeIdEnum.PRODUCT_SELECTION; /** +

References a ProductTailoring.

*/ + ReferenceTypeId PRODUCT_TAILORING = ReferenceTypeIdEnum.PRODUCT_TAILORING; + /**

References a ProductType.

*/ ReferenceTypeId PRODUCT_TYPE = ReferenceTypeIdEnum.PRODUCT_TYPE; /** @@ -263,6 +266,11 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ PRODUCT_SELECTION("product-selection"), + /** + * product-tailoring + */ + PRODUCT_TAILORING("product-tailoring"), + /** * product-type */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java index a086ec06d52..aa982d548a3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java @@ -23,6 +23,7 @@ import com.commercetools.api.models.product.ProductResourceIdentifier; import com.commercetools.api.models.product_discount.ProductDiscountResourceIdentifier; import com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifier; +import com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifier; import com.commercetools.api.models.product_type.ProductTypeResourceIdentifier; import com.commercetools.api.models.quote.QuoteResourceIdentifier; import com.commercetools.api.models.quote_request.QuoteRequestResourceIdentifier; @@ -71,6 +72,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.product_discount.ProductDiscountResourceIdentifierImpl.class, name = ProductDiscountResourceIdentifier.PRODUCT_DISCOUNT), @JsonSubTypes.Type(value = com.commercetools.api.models.product.ProductResourceIdentifierImpl.class, name = ProductResourceIdentifier.PRODUCT), @JsonSubTypes.Type(value = com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifierImpl.class, name = ProductSelectionResourceIdentifier.PRODUCT_SELECTION), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifierImpl.class, name = ProductTailoringResourceIdentifier.PRODUCT_TAILORING), @JsonSubTypes.Type(value = com.commercetools.api.models.product_type.ProductTypeResourceIdentifierImpl.class, name = ProductTypeResourceIdentifier.PRODUCT_TYPE), @JsonSubTypes.Type(value = com.commercetools.api.models.quote_request.QuoteRequestResourceIdentifierImpl.class, name = QuoteRequestResourceIdentifier.QUOTE_REQUEST), @JsonSubTypes.Type(value = com.commercetools.api.models.quote.QuoteResourceIdentifierImpl.class, name = QuoteResourceIdentifier.QUOTE), @@ -201,6 +203,10 @@ public static ResourceIdentifier deepCopy(@Nullable final ResourceIdentifier tem return com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifier.deepCopy( (com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifier) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifier) { + return com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifier.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifier) template); + } if (template instanceof com.commercetools.api.models.product_type.ProductTypeResourceIdentifier) { return com.commercetools.api.models.product_type.ProductTypeResourceIdentifier .deepCopy((com.commercetools.api.models.product_type.ProductTypeResourceIdentifier) template); @@ -387,6 +393,14 @@ public static com.commercetools.api.models.product_selection.ProductSelectionRes return com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifierBuilder.of(); } + /** + * builder for productTailoring subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifierBuilder productTailoringBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifierBuilder.of(); + } + /** * builder for productType subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java index 22362552af4..cdd0c9d4c0d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java @@ -75,6 +75,10 @@ public com.commercetools.api.models.product_selection.ProductSelectionResourceId return com.commercetools.api.models.product_selection.ProductSelectionResourceIdentifierBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifierBuilder productTailoringBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringResourceIdentifierBuilder.of(); + } + public com.commercetools.api.models.product_type.ProductTypeResourceIdentifierBuilder productTypeBuilder() { return com.commercetools.api.models.product_type.ProductTypeResourceIdentifierBuilder.of(); } 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 384759cb4a6..76698383cee 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 @@ -214,6 +214,13 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductSelectionVariantSelectionChangedMessageImpl.class, name = ProductSelectionVariantSelectionChangedMessage.PRODUCT_SELECTION_VARIANT_SELECTION_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductSlugChangedMessageImpl.class, name = ProductSlugChangedMessage.PRODUCT_SLUG_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductStateTransitionMessageImpl.class, name = ProductStateTransitionMessage.PRODUCT_STATE_TRANSITION), + @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.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), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringUnpublishedMessageImpl.class, name = ProductTailoringUnpublishedMessage.PRODUCT_TAILORING_UNPUBLISHED), @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), @@ -952,6 +959,34 @@ public static Message deepCopy(@Nullable final Message template) { return com.commercetools.api.models.message.ProductStateTransitionMessage .deepCopy((com.commercetools.api.models.message.ProductStateTransitionMessage) template); } + if (template instanceof com.commercetools.api.models.message.ProductTailoringCreatedMessage) { + return com.commercetools.api.models.message.ProductTailoringCreatedMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringCreatedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringDeletedMessage) { + return com.commercetools.api.models.message.ProductTailoringDeletedMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringDeletedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringDescriptionSetMessage) { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringDescriptionSetMessage) 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); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringPublishedMessage) { + return com.commercetools.api.models.message.ProductTailoringPublishedMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringPublishedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringSlugSetMessage) { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringSlugSetMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringUnpublishedMessage) { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringUnpublishedMessage) template); + } if (template instanceof com.commercetools.api.models.message.ProductUnpublishedMessage) { return com.commercetools.api.models.message.ProductUnpublishedMessage .deepCopy((com.commercetools.api.models.message.ProductUnpublishedMessage) template); @@ -2536,6 +2571,62 @@ public static com.commercetools.api.models.message.ProductStateTransitionMessage return com.commercetools.api.models.message.ProductStateTransitionMessageBuilder.of(); } + /** + * builder for productTailoringCreated subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringCreatedMessageBuilder productTailoringCreatedBuilder() { + return com.commercetools.api.models.message.ProductTailoringCreatedMessageBuilder.of(); + } + + /** + * builder for productTailoringDeleted subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringDeletedMessageBuilder productTailoringDeletedBuilder() { + return com.commercetools.api.models.message.ProductTailoringDeletedMessageBuilder.of(); + } + + /** + * builder for productTailoringDescriptionSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder productTailoringDescriptionSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder.of(); + } + + /** + * builder for productTailoringNameSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder productTailoringNameSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder.of(); + } + + /** + * builder for productTailoringPublished subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringPublishedMessageBuilder productTailoringPublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringPublishedMessageBuilder.of(); + } + + /** + * builder for productTailoringSlugSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringSlugSetMessageBuilder productTailoringSlugSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessageBuilder.of(); + } + + /** + * builder for productTailoringUnpublished subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringUnpublishedMessageBuilder productTailoringUnpublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessageBuilder.of(); + } + /** * builder for productUnpublished 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 06ba24a56f1..3f7a6165345 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 @@ -703,6 +703,34 @@ public com.commercetools.api.models.message.ProductStateTransitionMessageBuilder return com.commercetools.api.models.message.ProductStateTransitionMessageBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringCreatedMessageBuilder productTailoringCreatedBuilder() { + return com.commercetools.api.models.message.ProductTailoringCreatedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringDeletedMessageBuilder productTailoringDeletedBuilder() { + return com.commercetools.api.models.message.ProductTailoringDeletedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder productTailoringDescriptionSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder productTailoringNameSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringPublishedMessageBuilder productTailoringPublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringPublishedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringSlugSetMessageBuilder productTailoringSlugSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringUnpublishedMessageBuilder productTailoringUnpublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessageBuilder.of(); + } + public com.commercetools.api.models.message.ProductUnpublishedMessageBuilder productUnpublishedBuilder() { return com.commercetools.api.models.message.ProductUnpublishedMessageBuilder.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 f269ac9b733..49cb61072a9 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 @@ -201,6 +201,13 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductSelectionVariantSelectionChangedMessagePayloadImpl.class, name = ProductSelectionVariantSelectionChangedMessagePayload.PRODUCT_SELECTION_VARIANT_SELECTION_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductSlugChangedMessagePayloadImpl.class, name = ProductSlugChangedMessagePayload.PRODUCT_SLUG_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductStateTransitionMessagePayloadImpl.class, name = ProductStateTransitionMessagePayload.PRODUCT_STATE_TRANSITION), + @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.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), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayloadImpl.class, name = ProductTailoringUnpublishedMessagePayload.PRODUCT_TAILORING_UNPUBLISHED), @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), @@ -789,6 +796,34 @@ public static MessagePayload deepCopy(@Nullable final MessagePayload template) { return com.commercetools.api.models.message.ProductStateTransitionMessagePayload .deepCopy((com.commercetools.api.models.message.ProductStateTransitionMessagePayload) template); } + if (template instanceof com.commercetools.api.models.message.ProductTailoringCreatedMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringCreatedMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringCreatedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringDeletedMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringDeletedMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringDeletedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayload) 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); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringPublishedMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringPublishedMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringPublishedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayload) template); + } if (template instanceof com.commercetools.api.models.message.ProductUnpublishedMessagePayload) { return com.commercetools.api.models.message.ProductUnpublishedMessagePayload .deepCopy((com.commercetools.api.models.message.ProductUnpublishedMessagePayload) template); @@ -2365,6 +2400,62 @@ public static com.commercetools.api.models.message.ProductStateTransitionMessage return com.commercetools.api.models.message.ProductStateTransitionMessagePayloadBuilder.of(); } + /** + * builder for productTailoringCreated subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringCreatedMessagePayloadBuilder productTailoringCreatedBuilder() { + return com.commercetools.api.models.message.ProductTailoringCreatedMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringDeleted subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringDeletedMessagePayloadBuilder productTailoringDeletedBuilder() { + return com.commercetools.api.models.message.ProductTailoringDeletedMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringDescriptionSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder productTailoringDescriptionSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringNameSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder productTailoringNameSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringPublished subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringPublishedMessagePayloadBuilder productTailoringPublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringPublishedMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringSlugSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayloadBuilder productTailoringSlugSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringUnpublished subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayloadBuilder productTailoringUnpublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayloadBuilder.of(); + } + /** * builder for productUnpublished 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 1b24eef1030..4fd55ad27e1 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 @@ -703,6 +703,34 @@ public com.commercetools.api.models.message.ProductStateTransitionMessagePayload return com.commercetools.api.models.message.ProductStateTransitionMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringCreatedMessagePayloadBuilder productTailoringCreatedBuilder() { + return com.commercetools.api.models.message.ProductTailoringCreatedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringDeletedMessagePayloadBuilder productTailoringDeletedBuilder() { + return com.commercetools.api.models.message.ProductTailoringDeletedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder productTailoringDescriptionSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder productTailoringNameSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringPublishedMessagePayloadBuilder productTailoringPublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringPublishedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayloadBuilder productTailoringSlugSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayloadBuilder productTailoringUnpublishedBuilder() { + return com.commercetools.api.models.message.ProductTailoringUnpublishedMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ProductUnpublishedMessagePayloadBuilder productUnpublishedBuilder() { return com.commercetools.api.models.message.ProductUnpublishedMessagePayloadBuilder.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 new file mode 100644 index 00000000000..64b9926f6fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java @@ -0,0 +1,283 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Create Product Tailoring or Create Product Tailoring in Store request.

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

+ *     ProductTailoringCreatedMessage productTailoringCreatedMessage = ProductTailoringCreatedMessage.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)
+ *             .published(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringCreatedMessageImpl.class) +public interface ProductTailoringCreatedMessage extends Message { + + /** + * discriminator value for ProductTailoringCreatedMessage + */ + String PRODUCT_TAILORING_CREATED = "ProductTailoringCreated"; + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

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

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

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

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

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

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

true if the ProductTailoring is published.

+ * @return published + */ + @NotNull + @JsonProperty("published") + public Boolean getPublished(); + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ * @param published value to be set + */ + + public void setPublished(final Boolean published); + + /** + * factory method + * @return instance of ProductTailoringCreatedMessage + */ + public static ProductTailoringCreatedMessage of() { + return new ProductTailoringCreatedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringCreatedMessage of(final ProductTailoringCreatedMessage template) { + ProductTailoringCreatedMessageImpl instance = new ProductTailoringCreatedMessageImpl(); + 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.setKey(template.getKey()); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setDescription(template.getDescription()); + instance.setName(template.getName()); + instance.setSlug(template.getSlug()); + instance.setPublished(template.getPublished()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringCreatedMessage deepCopy(@Nullable final ProductTailoringCreatedMessage template) { + if (template == null) { + return null; + } + ProductTailoringCreatedMessageImpl instance = new ProductTailoringCreatedMessageImpl(); + 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.setKey(template.getKey()); + 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.setDescription( + 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.setPublished(template.getPublished()); + return instance; + } + + /** + * builder factory method for ProductTailoringCreatedMessage + * @return builder + */ + public static ProductTailoringCreatedMessageBuilder builder() { + return ProductTailoringCreatedMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringCreatedMessageBuilder builder(final ProductTailoringCreatedMessage template) { + return ProductTailoringCreatedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringCreatedMessage(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/ProductTailoringCreatedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java new file mode 100644 index 00000000000..71161715100 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java @@ -0,0 +1,730 @@ + +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; + +/** + * ProductTailoringCreatedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringCreatedMessage productTailoringCreatedMessage = ProductTailoringCreatedMessage.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)
+ *             .published(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringCreatedMessageBuilder 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; + + @Nullable + private String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + private Boolean published; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder 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 ProductTailoringCreatedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

true if the ProductTailoring is published.

+ * @param published value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder published(final Boolean published) { + this.published = published; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ * @return published + */ + + public Boolean getPublished() { + return this.published; + } + + /** + * builds ProductTailoringCreatedMessage with checking for non-null required values + * @return ProductTailoringCreatedMessage + */ + public ProductTailoringCreatedMessage build() { + Objects.requireNonNull(id, ProductTailoringCreatedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringCreatedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringCreatedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringCreatedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringCreatedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringCreatedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, ProductTailoringCreatedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringCreatedMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringCreatedMessage.class + ": product is missing"); + 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); + } + + /** + * builds ProductTailoringCreatedMessage without checking for non-null required values + * @return ProductTailoringCreatedMessage + */ + public ProductTailoringCreatedMessage buildUnchecked() { + return new ProductTailoringCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, key, store, productKey, product, + description, name, slug, published); + } + + /** + * factory method for an instance of ProductTailoringCreatedMessageBuilder + * @return builder + */ + public static ProductTailoringCreatedMessageBuilder of() { + return new ProductTailoringCreatedMessageBuilder(); + } + + /** + * create builder for ProductTailoringCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringCreatedMessageBuilder of(final ProductTailoringCreatedMessage template) { + ProductTailoringCreatedMessageBuilder builder = new ProductTailoringCreatedMessageBuilder(); + 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.key = template.getKey(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.description = template.getDescription(); + builder.name = template.getName(); + builder.slug = template.getSlug(); + 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 new file mode 100644 index 00000000000..3abcf1eb29a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java @@ -0,0 +1,436 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Create Product Tailoring or Create Product Tailoring in Store request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringCreatedMessageImpl implements ProductTailoringCreatedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString slug; + + private Boolean published; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringCreatedMessageImpl(@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("key") final String key, + @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("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("published") final Boolean published) { + 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.key = key; + this.store = store; + this.productKey = productKey; + this.product = product; + this.description = description; + this.name = name; + this.slug = slug; + this.published = published; + this.type = PRODUCT_TAILORING_CREATED; + } + + /** + * create empty instance + */ + public ProductTailoringCreatedMessageImpl() { + this.type = PRODUCT_TAILORING_CREATED; + } + + /** + *

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

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

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

+ */ + + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ */ + + public Boolean getPublished() { + return this.published; + } + + 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 setKey(final String key) { + this.key = key; + } + + 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 setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setPublished(final Boolean published) { + this.published = published; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringCreatedMessageImpl that = (ProductTailoringCreatedMessageImpl) 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(key, that.key) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(name, that.name) + .append(slug, that.slug) + .append(published, that.published) + .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(key, that.key) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(name, that.name) + .append(slug, that.slug) + .append(published, that.published) + .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(key) + .append(store) + .append(productKey) + .append(product) + .append(description) + .append(name) + .append(slug) + .append(published) + .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("key", key) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("description", description) + .append("name", name) + .append("slug", slug) + .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 new file mode 100644 index 00000000000..d6c6820caef --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java @@ -0,0 +1,256 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Create Product Tailoring or Create Product Tailoring in Store request.

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

+ *     ProductTailoringCreatedMessagePayload productTailoringCreatedMessagePayload = ProductTailoringCreatedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .published(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringCreatedMessagePayloadImpl.class) +public interface ProductTailoringCreatedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringCreatedMessagePayload + */ + String PRODUCT_TAILORING_CREATED = "ProductTailoringCreated"; + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

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

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

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

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

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

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

true if the ProductTailoring is published.

+ * @return published + */ + @NotNull + @JsonProperty("published") + public Boolean getPublished(); + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ * @param published value to be set + */ + + public void setPublished(final Boolean published); + + /** + * factory method + * @return instance of ProductTailoringCreatedMessagePayload + */ + public static ProductTailoringCreatedMessagePayload of() { + return new ProductTailoringCreatedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringCreatedMessagePayload of(final ProductTailoringCreatedMessagePayload template) { + ProductTailoringCreatedMessagePayloadImpl instance = new ProductTailoringCreatedMessagePayloadImpl(); + instance.setKey(template.getKey()); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setDescription(template.getDescription()); + instance.setName(template.getName()); + instance.setSlug(template.getSlug()); + instance.setPublished(template.getPublished()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringCreatedMessagePayload deepCopy( + @Nullable final ProductTailoringCreatedMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringCreatedMessagePayloadImpl instance = new ProductTailoringCreatedMessagePayloadImpl(); + instance.setKey(template.getKey()); + 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.setDescription( + 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.setPublished(template.getPublished()); + return instance; + } + + /** + * builder factory method for ProductTailoringCreatedMessagePayload + * @return builder + */ + public static ProductTailoringCreatedMessagePayloadBuilder builder() { + return ProductTailoringCreatedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringCreatedMessagePayloadBuilder builder( + final ProductTailoringCreatedMessagePayload template) { + return ProductTailoringCreatedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringCreatedMessagePayload(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/ProductTailoringCreatedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java new file mode 100644 index 00000000000..7da513b45e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java @@ -0,0 +1,388 @@ + +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; + +/** + * ProductTailoringCreatedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringCreatedMessagePayload productTailoringCreatedMessagePayload = ProductTailoringCreatedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .published(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringCreatedMessagePayloadBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + private Boolean published; + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder 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 ProductTailoringCreatedMessagePayloadBuilder 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 ProductTailoringCreatedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder 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 ProductTailoringCreatedMessagePayloadBuilder 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 ProductTailoringCreatedMessagePayloadBuilder 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 ProductTailoringCreatedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

true if the ProductTailoring is published.

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

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ * @return published + */ + + public Boolean getPublished() { + return this.published; + } + + /** + * builds ProductTailoringCreatedMessagePayload with checking for non-null required values + * @return ProductTailoringCreatedMessagePayload + */ + public ProductTailoringCreatedMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringCreatedMessagePayload.class + ": store is missing"); + 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); + } + + /** + * builds ProductTailoringCreatedMessagePayload without checking for non-null required values + * @return ProductTailoringCreatedMessagePayload + */ + public ProductTailoringCreatedMessagePayload buildUnchecked() { + return new ProductTailoringCreatedMessagePayloadImpl(key, store, productKey, product, description, name, slug, + published); + } + + /** + * factory method for an instance of ProductTailoringCreatedMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringCreatedMessagePayloadBuilder of() { + return new ProductTailoringCreatedMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringCreatedMessagePayloadBuilder of( + final ProductTailoringCreatedMessagePayload template) { + ProductTailoringCreatedMessagePayloadBuilder builder = new ProductTailoringCreatedMessagePayloadBuilder(); + builder.key = template.getKey(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.description = template.getDescription(); + builder.name = template.getName(); + builder.slug = template.getSlug(); + 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 new file mode 100644 index 00000000000..20cae1a91eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java @@ -0,0 +1,236 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Create Product Tailoring or Create Product Tailoring in Store request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringCreatedMessagePayloadImpl implements ProductTailoringCreatedMessagePayload, ModelBase { + + private String type; + + private String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString slug; + + private Boolean published; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringCreatedMessagePayloadImpl(@JsonProperty("key") final String key, + @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("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("published") final Boolean published) { + this.key = key; + this.store = store; + this.productKey = productKey; + this.product = product; + this.description = description; + this.name = name; + this.slug = slug; + this.published = published; + this.type = PRODUCT_TAILORING_CREATED; + } + + /** + * create empty instance + */ + public ProductTailoringCreatedMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_CREATED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

User-defined unique identifier of the Product Tailoring.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

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

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

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

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

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

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

true if the ProductTailoring is published.

+ */ + + public Boolean getPublished() { + return this.published; + } + + public void setKey(final String key) { + this.key = key; + } + + 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 setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setPublished(final Boolean published) { + this.published = published; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringCreatedMessagePayloadImpl that = (ProductTailoringCreatedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(key, that.key) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(name, that.name) + .append(slug, that.slug) + .append(published, that.published) + .append(type, that.type) + .append(key, that.key) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(name, that.name) + .append(slug, that.slug) + .append(published, that.published) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(key) + .append(store) + .append(productKey) + .append(product) + .append(description) + .append(name) + .append(slug) + .append(published) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("key", key) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("description", description) + .append("name", name) + .append("slug", slug) + .append("published", published) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessage.java new file mode 100644 index 00000000000..c548d909847 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessage.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Delete Product Tailoring or Delete ProductTailoring assigned to Product in Store request.

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

+ *     ProductTailoringDeletedMessage productTailoringDeletedMessage = ProductTailoringDeletedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDeletedMessageImpl.class) +public interface ProductTailoringDeletedMessage extends Message { + + /** + * discriminator value for ProductTailoringDeletedMessage + */ + String PRODUCT_TAILORING_DELETED = "ProductTailoringDeleted"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringDeletedMessage + */ + public static ProductTailoringDeletedMessage of() { + return new ProductTailoringDeletedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringDeletedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringDeletedMessage of(final ProductTailoringDeletedMessage template) { + ProductTailoringDeletedMessageImpl instance = new ProductTailoringDeletedMessageImpl(); + 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()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringDeletedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringDeletedMessage deepCopy(@Nullable final ProductTailoringDeletedMessage template) { + if (template == null) { + return null; + } + ProductTailoringDeletedMessageImpl instance = new ProductTailoringDeletedMessageImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringDeletedMessage + * @return builder + */ + public static ProductTailoringDeletedMessageBuilder builder() { + return ProductTailoringDeletedMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringDeletedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDeletedMessageBuilder builder(final ProductTailoringDeletedMessage template) { + return ProductTailoringDeletedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringDeletedMessage(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/ProductTailoringDeletedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageBuilder.java new file mode 100644 index 00000000000..7ff63bd39e7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageBuilder.java @@ -0,0 +1,528 @@ + +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; + +/** + * ProductTailoringDeletedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringDeletedMessage productTailoringDeletedMessage = ProductTailoringDeletedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDeletedMessageBuilder 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; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder 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 ProductTailoringDeletedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + * builds ProductTailoringDeletedMessage with checking for non-null required values + * @return ProductTailoringDeletedMessage + */ + public ProductTailoringDeletedMessage build() { + Objects.requireNonNull(id, ProductTailoringDeletedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringDeletedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringDeletedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringDeletedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringDeletedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringDeletedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, ProductTailoringDeletedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringDeletedMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringDeletedMessage.class + ": product is missing"); + return new ProductTailoringDeletedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product); + } + + /** + * builds ProductTailoringDeletedMessage without checking for non-null required values + * @return ProductTailoringDeletedMessage + */ + public ProductTailoringDeletedMessage buildUnchecked() { + return new ProductTailoringDeletedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product); + } + + /** + * factory method for an instance of ProductTailoringDeletedMessageBuilder + * @return builder + */ + public static ProductTailoringDeletedMessageBuilder of() { + return new ProductTailoringDeletedMessageBuilder(); + } + + /** + * create builder for ProductTailoringDeletedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDeletedMessageBuilder of(final ProductTailoringDeletedMessage template) { + ProductTailoringDeletedMessageBuilder builder = new ProductTailoringDeletedMessageBuilder(); + 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(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageImpl.java new file mode 100644 index 00000000000..13dcb7f52ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageImpl.java @@ -0,0 +1,336 @@ + +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 Delete Product Tailoring or Delete ProductTailoring assigned to Product in Store request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDeletedMessageImpl implements ProductTailoringDeletedMessage, 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; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDeletedMessageImpl(@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) { + 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.type = PRODUCT_TAILORING_DELETED; + } + + /** + * create empty instance + */ + public ProductTailoringDeletedMessageImpl() { + this.type = PRODUCT_TAILORING_DELETED; + } + + /** + *

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

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

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

+ */ + + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDeletedMessageImpl that = (ProductTailoringDeletedMessageImpl) 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(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) + .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) + .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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayload.java new file mode 100644 index 00000000000..618fffbad0d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayload.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Delete Product Tailoring or Delete ProductTailoring assigned to Product in Store request.

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

+ *     ProductTailoringDeletedMessagePayload productTailoringDeletedMessagePayload = ProductTailoringDeletedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDeletedMessagePayloadImpl.class) +public interface ProductTailoringDeletedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringDeletedMessagePayload + */ + String PRODUCT_TAILORING_DELETED = "ProductTailoringDeleted"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringDeletedMessagePayload + */ + public static ProductTailoringDeletedMessagePayload of() { + return new ProductTailoringDeletedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringDeletedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringDeletedMessagePayload of(final ProductTailoringDeletedMessagePayload template) { + ProductTailoringDeletedMessagePayloadImpl instance = new ProductTailoringDeletedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringDeletedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringDeletedMessagePayload deepCopy( + @Nullable final ProductTailoringDeletedMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringDeletedMessagePayloadImpl instance = new ProductTailoringDeletedMessagePayloadImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringDeletedMessagePayload + * @return builder + */ + public static ProductTailoringDeletedMessagePayloadBuilder builder() { + return ProductTailoringDeletedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringDeletedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDeletedMessagePayloadBuilder builder( + final ProductTailoringDeletedMessagePayload template) { + return ProductTailoringDeletedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringDeletedMessagePayload(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/ProductTailoringDeletedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadBuilder.java new file mode 100644 index 00000000000..0a763ad718b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadBuilder.java @@ -0,0 +1,186 @@ + +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; + +/** + * ProductTailoringDeletedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringDeletedMessagePayload productTailoringDeletedMessagePayload = ProductTailoringDeletedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDeletedMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringDeletedMessagePayloadBuilder 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 ProductTailoringDeletedMessagePayloadBuilder 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 ProductTailoringDeletedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringDeletedMessagePayloadBuilder 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 ProductTailoringDeletedMessagePayloadBuilder 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 ProductTailoringDeletedMessagePayloadBuilder 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 ProductTailoringDeletedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + * builds ProductTailoringDeletedMessagePayload with checking for non-null required values + * @return ProductTailoringDeletedMessagePayload + */ + public ProductTailoringDeletedMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringDeletedMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringDeletedMessagePayload.class + ": product is missing"); + return new ProductTailoringDeletedMessagePayloadImpl(store, productKey, product); + } + + /** + * builds ProductTailoringDeletedMessagePayload without checking for non-null required values + * @return ProductTailoringDeletedMessagePayload + */ + public ProductTailoringDeletedMessagePayload buildUnchecked() { + return new ProductTailoringDeletedMessagePayloadImpl(store, productKey, product); + } + + /** + * factory method for an instance of ProductTailoringDeletedMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringDeletedMessagePayloadBuilder of() { + return new ProductTailoringDeletedMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringDeletedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDeletedMessagePayloadBuilder of( + final ProductTailoringDeletedMessagePayload template) { + ProductTailoringDeletedMessagePayloadBuilder builder = new ProductTailoringDeletedMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadImpl.java new file mode 100644 index 00000000000..e8712b59cfe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadImpl.java @@ -0,0 +1,133 @@ + +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 Delete Product Tailoring or Delete ProductTailoring assigned to Product in Store request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDeletedMessagePayloadImpl implements ProductTailoringDeletedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDeletedMessagePayloadImpl( + @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) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.type = PRODUCT_TAILORING_DELETED; + } + + /** + * create empty instance + */ + public ProductTailoringDeletedMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_DELETED; + } + + /** + * + */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDeletedMessagePayloadImpl that = (ProductTailoringDeletedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(store).append(productKey).append(product).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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessage.java new file mode 100644 index 00000000000..fa2b6ddb6eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessage.java @@ -0,0 +1,234 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Description update action.

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

+ *     ProductTailoringDescriptionSetMessage productTailoringDescriptionSetMessage = ProductTailoringDescriptionSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDescriptionSetMessageImpl.class) +public interface ProductTailoringDescriptionSetMessage extends Message { + + /** + * discriminator value for ProductTailoringDescriptionSetMessage + */ + String PRODUCT_TAILORING_DESCRIPTION_SET = "ProductTailoringDescriptionSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The description of the Product Tailoring after the Set Description update action.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

The description of the ProductTailoring before the Set Description update action.

+ * @return oldDescription + */ + @Valid + @JsonProperty("oldDescription") + public LocalizedString getOldDescription(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ * @param oldDescription value to be set + */ + + public void setOldDescription(final LocalizedString oldDescription); + + /** + * factory method + * @return instance of ProductTailoringDescriptionSetMessage + */ + public static ProductTailoringDescriptionSetMessage of() { + return new ProductTailoringDescriptionSetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringDescriptionSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringDescriptionSetMessage of(final ProductTailoringDescriptionSetMessage template) { + ProductTailoringDescriptionSetMessageImpl instance = new ProductTailoringDescriptionSetMessageImpl(); + 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.setDescription(template.getDescription()); + instance.setOldDescription(template.getOldDescription()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringDescriptionSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringDescriptionSetMessage deepCopy( + @Nullable final ProductTailoringDescriptionSetMessage template) { + if (template == null) { + return null; + } + ProductTailoringDescriptionSetMessageImpl instance = new ProductTailoringDescriptionSetMessageImpl(); + 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.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setOldDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldDescription())); + return instance; + } + + /** + * builder factory method for ProductTailoringDescriptionSetMessage + * @return builder + */ + public static ProductTailoringDescriptionSetMessageBuilder builder() { + return ProductTailoringDescriptionSetMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringDescriptionSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDescriptionSetMessageBuilder builder( + final ProductTailoringDescriptionSetMessage template) { + return ProductTailoringDescriptionSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringDescriptionSetMessage(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/ProductTailoringDescriptionSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageBuilder.java new file mode 100644 index 00000000000..3fea2d8e112 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageBuilder.java @@ -0,0 +1,634 @@ + +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; + +/** + * ProductTailoringDescriptionSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringDescriptionSetMessage productTailoringDescriptionSetMessage = ProductTailoringDescriptionSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDescriptionSetMessageBuilder 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; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldDescription; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder 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 ProductTailoringDescriptionSetMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the Product Tailoring after the Set Description update action.

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

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ * @param oldDescription value to be set + * @return Builder + */ + + public ProductTailoringDescriptionSetMessageBuilder oldDescription( + @Nullable final com.commercetools.api.models.common.LocalizedString oldDescription) { + this.oldDescription = oldDescription; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ * @return oldDescription + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldDescription() { + return this.oldDescription; + } + + /** + * builds ProductTailoringDescriptionSetMessage with checking for non-null required values + * @return ProductTailoringDescriptionSetMessage + */ + public ProductTailoringDescriptionSetMessage build() { + Objects.requireNonNull(id, ProductTailoringDescriptionSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringDescriptionSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringDescriptionSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductTailoringDescriptionSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductTailoringDescriptionSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringDescriptionSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductTailoringDescriptionSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringDescriptionSetMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringDescriptionSetMessage.class + ": product is missing"); + return new ProductTailoringDescriptionSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, description, oldDescription); + } + + /** + * builds ProductTailoringDescriptionSetMessage without checking for non-null required values + * @return ProductTailoringDescriptionSetMessage + */ + public ProductTailoringDescriptionSetMessage buildUnchecked() { + return new ProductTailoringDescriptionSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, description, oldDescription); + } + + /** + * factory method for an instance of ProductTailoringDescriptionSetMessageBuilder + * @return builder + */ + public static ProductTailoringDescriptionSetMessageBuilder of() { + return new ProductTailoringDescriptionSetMessageBuilder(); + } + + /** + * create builder for ProductTailoringDescriptionSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDescriptionSetMessageBuilder of( + final ProductTailoringDescriptionSetMessage template) { + ProductTailoringDescriptionSetMessageBuilder builder = new ProductTailoringDescriptionSetMessageBuilder(); + 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.description = template.getDescription(); + builder.oldDescription = template.getOldDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageImpl.java new file mode 100644 index 00000000000..774eaebeff4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageImpl.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 Product Tailoring Set Description update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDescriptionSetMessageImpl implements ProductTailoringDescriptionSetMessage, 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 com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.common.LocalizedString oldDescription; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDescriptionSetMessageImpl(@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("description") final com.commercetools.api.models.common.LocalizedString description, + @JsonProperty("oldDescription") final com.commercetools.api.models.common.LocalizedString oldDescription) { + 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.description = description; + this.oldDescription = oldDescription; + this.type = PRODUCT_TAILORING_DESCRIPTION_SET; + } + + /** + * create empty instance + */ + public ProductTailoringDescriptionSetMessageImpl() { + this.type = PRODUCT_TAILORING_DESCRIPTION_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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldDescription() { + return this.oldDescription; + } + + 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 setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setOldDescription(final com.commercetools.api.models.common.LocalizedString oldDescription) { + this.oldDescription = oldDescription; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDescriptionSetMessageImpl that = (ProductTailoringDescriptionSetMessageImpl) 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(description, that.description) + .append(oldDescription, that.oldDescription) + .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(description, that.description) + .append(oldDescription, that.oldDescription) + .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(description) + .append(oldDescription) + .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("description", description) + .append("oldDescription", oldDescription) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayload.java new file mode 100644 index 00000000000..6d971adacb1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayload.java @@ -0,0 +1,207 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Description update action.

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

+ *     ProductTailoringDescriptionSetMessagePayload productTailoringDescriptionSetMessagePayload = ProductTailoringDescriptionSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDescriptionSetMessagePayloadImpl.class) +public interface ProductTailoringDescriptionSetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringDescriptionSetMessagePayload + */ + String PRODUCT_TAILORING_DESCRIPTION_SET = "ProductTailoringDescriptionSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The description of the Product Tailoring after the Set Description update action.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

The description of the ProductTailoring before the Set Description update action.

+ * @return oldDescription + */ + @Valid + @JsonProperty("oldDescription") + public LocalizedString getOldDescription(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ * @param oldDescription value to be set + */ + + public void setOldDescription(final LocalizedString oldDescription); + + /** + * factory method + * @return instance of ProductTailoringDescriptionSetMessagePayload + */ + public static ProductTailoringDescriptionSetMessagePayload of() { + return new ProductTailoringDescriptionSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringDescriptionSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringDescriptionSetMessagePayload of( + final ProductTailoringDescriptionSetMessagePayload template) { + ProductTailoringDescriptionSetMessagePayloadImpl instance = new ProductTailoringDescriptionSetMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setDescription(template.getDescription()); + instance.setOldDescription(template.getOldDescription()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringDescriptionSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringDescriptionSetMessagePayload deepCopy( + @Nullable final ProductTailoringDescriptionSetMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringDescriptionSetMessagePayloadImpl instance = new ProductTailoringDescriptionSetMessagePayloadImpl(); + 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.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setOldDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldDescription())); + return instance; + } + + /** + * builder factory method for ProductTailoringDescriptionSetMessagePayload + * @return builder + */ + public static ProductTailoringDescriptionSetMessagePayloadBuilder builder() { + return ProductTailoringDescriptionSetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringDescriptionSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDescriptionSetMessagePayloadBuilder builder( + final ProductTailoringDescriptionSetMessagePayload template) { + return ProductTailoringDescriptionSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringDescriptionSetMessagePayload( + 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/ProductTailoringDescriptionSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..cde110e33cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadBuilder.java @@ -0,0 +1,289 @@ + +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; + +/** + * ProductTailoringDescriptionSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringDescriptionSetMessagePayload productTailoringDescriptionSetMessagePayload = ProductTailoringDescriptionSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDescriptionSetMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldDescription; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringDescriptionSetMessagePayloadBuilder 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 ProductTailoringDescriptionSetMessagePayloadBuilder 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 ProductTailoringDescriptionSetMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringDescriptionSetMessagePayloadBuilder 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 ProductTailoringDescriptionSetMessagePayloadBuilder 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 ProductTailoringDescriptionSetMessagePayloadBuilder 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 ProductTailoringDescriptionSetMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the Product Tailoring after the Set Description update action.

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

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ * @return oldDescription + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldDescription() { + return this.oldDescription; + } + + /** + * builds ProductTailoringDescriptionSetMessagePayload with checking for non-null required values + * @return ProductTailoringDescriptionSetMessagePayload + */ + public ProductTailoringDescriptionSetMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringDescriptionSetMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringDescriptionSetMessagePayload.class + ": product is missing"); + return new ProductTailoringDescriptionSetMessagePayloadImpl(store, productKey, product, description, + oldDescription); + } + + /** + * builds ProductTailoringDescriptionSetMessagePayload without checking for non-null required values + * @return ProductTailoringDescriptionSetMessagePayload + */ + public ProductTailoringDescriptionSetMessagePayload buildUnchecked() { + return new ProductTailoringDescriptionSetMessagePayloadImpl(store, productKey, product, description, + oldDescription); + } + + /** + * factory method for an instance of ProductTailoringDescriptionSetMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringDescriptionSetMessagePayloadBuilder of() { + return new ProductTailoringDescriptionSetMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringDescriptionSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDescriptionSetMessagePayloadBuilder of( + final ProductTailoringDescriptionSetMessagePayload template) { + ProductTailoringDescriptionSetMessagePayloadBuilder builder = new ProductTailoringDescriptionSetMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.description = template.getDescription(); + builder.oldDescription = template.getOldDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadImpl.java new file mode 100644 index 00000000000..6fd0391e5fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadImpl.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 Product Tailoring Set Description update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDescriptionSetMessagePayloadImpl + implements ProductTailoringDescriptionSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.common.LocalizedString oldDescription; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDescriptionSetMessagePayloadImpl( + @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("description") final com.commercetools.api.models.common.LocalizedString description, + @JsonProperty("oldDescription") final com.commercetools.api.models.common.LocalizedString oldDescription) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.description = description; + this.oldDescription = oldDescription; + this.type = PRODUCT_TAILORING_DESCRIPTION_SET; + } + + /** + * create empty instance + */ + public ProductTailoringDescriptionSetMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_DESCRIPTION_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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The description of the Product Tailoring after the Set Description update action.

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

The description of the ProductTailoring before the Set Description update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldDescription() { + return this.oldDescription; + } + + 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 setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setOldDescription(final com.commercetools.api.models.common.LocalizedString oldDescription) { + this.oldDescription = oldDescription; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDescriptionSetMessagePayloadImpl that = (ProductTailoringDescriptionSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(oldDescription, that.oldDescription) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(description, that.description) + .append(oldDescription, that.oldDescription) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(description) + .append(oldDescription) + .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("description", description) + .append("oldDescription", oldDescription) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessage.java new file mode 100644 index 00000000000..c5a2cb56964 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessage.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Name update action.

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

+ *     ProductTailoringNameSetMessage productTailoringNameSetMessage = ProductTailoringNameSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringNameSetMessageImpl.class) +public interface ProductTailoringNameSetMessage extends Message { + + /** + * discriminator value for ProductTailoringNameSetMessage + */ + String PRODUCT_TAILORING_NAME_SET = "ProductTailoringNameSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The name of the Product Tailoring after the Set Name update action.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

The name of the ProductTailoring before the Set Name update action.

+ * @return oldName + */ + @Valid + @JsonProperty("oldName") + public LocalizedString getOldName(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ * @param oldName value to be set + */ + + public void setOldName(final LocalizedString oldName); + + /** + * factory method + * @return instance of ProductTailoringNameSetMessage + */ + public static ProductTailoringNameSetMessage of() { + return new ProductTailoringNameSetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringNameSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringNameSetMessage of(final ProductTailoringNameSetMessage template) { + ProductTailoringNameSetMessageImpl instance = new ProductTailoringNameSetMessageImpl(); + 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.setName(template.getName()); + instance.setOldName(template.getOldName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringNameSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringNameSetMessage deepCopy(@Nullable final ProductTailoringNameSetMessage template) { + if (template == null) { + return null; + } + ProductTailoringNameSetMessageImpl instance = new ProductTailoringNameSetMessageImpl(); + 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.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setOldName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldName())); + return instance; + } + + /** + * builder factory method for ProductTailoringNameSetMessage + * @return builder + */ + public static ProductTailoringNameSetMessageBuilder builder() { + return ProductTailoringNameSetMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringNameSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringNameSetMessageBuilder builder(final ProductTailoringNameSetMessage template) { + return ProductTailoringNameSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringNameSetMessage(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/ProductTailoringNameSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageBuilder.java new file mode 100644 index 00000000000..0f93d262459 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageBuilder.java @@ -0,0 +1,630 @@ + +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; + +/** + * ProductTailoringNameSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringNameSetMessage productTailoringNameSetMessage = ProductTailoringNameSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringNameSetMessageBuilder 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; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldName; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder 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 ProductTailoringNameSetMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the Product Tailoring after the Set Name update action.

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

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ * @param oldName value to be set + * @return Builder + */ + + public ProductTailoringNameSetMessageBuilder oldName( + @Nullable final com.commercetools.api.models.common.LocalizedString oldName) { + this.oldName = oldName; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ * @return oldName + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldName() { + return this.oldName; + } + + /** + * builds ProductTailoringNameSetMessage with checking for non-null required values + * @return ProductTailoringNameSetMessage + */ + public ProductTailoringNameSetMessage build() { + Objects.requireNonNull(id, ProductTailoringNameSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringNameSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringNameSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringNameSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringNameSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringNameSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, ProductTailoringNameSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringNameSetMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringNameSetMessage.class + ": product is missing"); + return new ProductTailoringNameSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, + name, oldName); + } + + /** + * builds ProductTailoringNameSetMessage without checking for non-null required values + * @return ProductTailoringNameSetMessage + */ + public ProductTailoringNameSetMessage buildUnchecked() { + return new ProductTailoringNameSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, + name, oldName); + } + + /** + * factory method for an instance of ProductTailoringNameSetMessageBuilder + * @return builder + */ + public static ProductTailoringNameSetMessageBuilder of() { + return new ProductTailoringNameSetMessageBuilder(); + } + + /** + * create builder for ProductTailoringNameSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringNameSetMessageBuilder of(final ProductTailoringNameSetMessage template) { + ProductTailoringNameSetMessageBuilder builder = new ProductTailoringNameSetMessageBuilder(); + 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.name = template.getName(); + builder.oldName = template.getOldName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageImpl.java new file mode 100644 index 00000000000..fa22b9a5c8a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageImpl.java @@ -0,0 +1,376 @@ + +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 Product Tailoring Set Name update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringNameSetMessageImpl implements ProductTailoringNameSetMessage, 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 com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString oldName; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringNameSetMessageImpl(@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("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("oldName") final com.commercetools.api.models.common.LocalizedString oldName) { + 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.name = name; + this.oldName = oldName; + this.type = PRODUCT_TAILORING_NAME_SET; + } + + /** + * create empty instance + */ + public ProductTailoringNameSetMessageImpl() { + this.type = PRODUCT_TAILORING_NAME_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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldName() { + return this.oldName; + } + + 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 setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setOldName(final com.commercetools.api.models.common.LocalizedString oldName) { + this.oldName = oldName; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringNameSetMessageImpl that = (ProductTailoringNameSetMessageImpl) 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(name, that.name) + .append(oldName, that.oldName) + .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(name, that.name) + .append(oldName, that.oldName) + .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(name) + .append(oldName) + .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("name", name) + .append("oldName", oldName) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayload.java new file mode 100644 index 00000000000..9f135fa019e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayload.java @@ -0,0 +1,203 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Name update action.

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

+ *     ProductTailoringNameSetMessagePayload productTailoringNameSetMessagePayload = ProductTailoringNameSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringNameSetMessagePayloadImpl.class) +public interface ProductTailoringNameSetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringNameSetMessagePayload + */ + String PRODUCT_TAILORING_NAME_SET = "ProductTailoringNameSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The name of the Product Tailoring after the Set Name update action.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

The name of the ProductTailoring before the Set Name update action.

+ * @return oldName + */ + @Valid + @JsonProperty("oldName") + public LocalizedString getOldName(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ * @param oldName value to be set + */ + + public void setOldName(final LocalizedString oldName); + + /** + * factory method + * @return instance of ProductTailoringNameSetMessagePayload + */ + public static ProductTailoringNameSetMessagePayload of() { + return new ProductTailoringNameSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringNameSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringNameSetMessagePayload of(final ProductTailoringNameSetMessagePayload template) { + ProductTailoringNameSetMessagePayloadImpl instance = new ProductTailoringNameSetMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setName(template.getName()); + instance.setOldName(template.getOldName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringNameSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringNameSetMessagePayload deepCopy( + @Nullable final ProductTailoringNameSetMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringNameSetMessagePayloadImpl instance = new ProductTailoringNameSetMessagePayloadImpl(); + 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.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setOldName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldName())); + return instance; + } + + /** + * builder factory method for ProductTailoringNameSetMessagePayload + * @return builder + */ + public static ProductTailoringNameSetMessagePayloadBuilder builder() { + return ProductTailoringNameSetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringNameSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringNameSetMessagePayloadBuilder builder( + final ProductTailoringNameSetMessagePayload template) { + return ProductTailoringNameSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringNameSetMessagePayload(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/ProductTailoringNameSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..55aadec34ed --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadBuilder.java @@ -0,0 +1,286 @@ + +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; + +/** + * ProductTailoringNameSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringNameSetMessagePayload productTailoringNameSetMessagePayload = ProductTailoringNameSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringNameSetMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldName; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringNameSetMessagePayloadBuilder 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 ProductTailoringNameSetMessagePayloadBuilder 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 ProductTailoringNameSetMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringNameSetMessagePayloadBuilder 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 ProductTailoringNameSetMessagePayloadBuilder 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 ProductTailoringNameSetMessagePayloadBuilder 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 ProductTailoringNameSetMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the Product Tailoring after the Set Name update action.

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

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ * @return oldName + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldName() { + return this.oldName; + } + + /** + * builds ProductTailoringNameSetMessagePayload with checking for non-null required values + * @return ProductTailoringNameSetMessagePayload + */ + public ProductTailoringNameSetMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringNameSetMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringNameSetMessagePayload.class + ": product is missing"); + return new ProductTailoringNameSetMessagePayloadImpl(store, productKey, product, name, oldName); + } + + /** + * builds ProductTailoringNameSetMessagePayload without checking for non-null required values + * @return ProductTailoringNameSetMessagePayload + */ + public ProductTailoringNameSetMessagePayload buildUnchecked() { + return new ProductTailoringNameSetMessagePayloadImpl(store, productKey, product, name, oldName); + } + + /** + * factory method for an instance of ProductTailoringNameSetMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringNameSetMessagePayloadBuilder of() { + return new ProductTailoringNameSetMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringNameSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringNameSetMessagePayloadBuilder of( + final ProductTailoringNameSetMessagePayload template) { + ProductTailoringNameSetMessagePayloadBuilder builder = new ProductTailoringNameSetMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.name = template.getName(); + builder.oldName = template.getOldName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadImpl.java new file mode 100644 index 00000000000..8bf04aaf920 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadImpl.java @@ -0,0 +1,177 @@ + +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 Product Tailoring Set Name update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringNameSetMessagePayloadImpl implements ProductTailoringNameSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString oldName; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringNameSetMessagePayloadImpl( + @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("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("oldName") final com.commercetools.api.models.common.LocalizedString oldName) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.name = name; + this.oldName = oldName; + this.type = PRODUCT_TAILORING_NAME_SET; + } + + /** + * create empty instance + */ + public ProductTailoringNameSetMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_NAME_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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The name of the Product Tailoring after the Set Name update action.

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

The name of the ProductTailoring before the Set Name update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldName() { + return this.oldName; + } + + 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 setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setOldName(final com.commercetools.api.models.common.LocalizedString oldName) { + this.oldName = oldName; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringNameSetMessagePayloadImpl that = (ProductTailoringNameSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(name, that.name) + .append(oldName, that.oldName) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(name, that.name) + .append(oldName, that.oldName) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(name) + .append(oldName) + .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("name", name) + .append("oldName", oldName) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessage.java new file mode 100644 index 00000000000..9b5c75197fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessage.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Product Tailoring Publish update action.

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

+ *     ProductTailoringPublishedMessage productTailoringPublishedMessage = ProductTailoringPublishedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringPublishedMessageImpl.class) +public interface ProductTailoringPublishedMessage extends Message { + + /** + * discriminator value for ProductTailoringPublishedMessage + */ + String PRODUCT_TAILORING_PUBLISHED = "ProductTailoringPublished"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringPublishedMessage + */ + public static ProductTailoringPublishedMessage of() { + return new ProductTailoringPublishedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringPublishedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringPublishedMessage of(final ProductTailoringPublishedMessage template) { + ProductTailoringPublishedMessageImpl instance = new ProductTailoringPublishedMessageImpl(); + 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()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringPublishedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringPublishedMessage deepCopy(@Nullable final ProductTailoringPublishedMessage template) { + if (template == null) { + return null; + } + ProductTailoringPublishedMessageImpl instance = new ProductTailoringPublishedMessageImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringPublishedMessage + * @return builder + */ + public static ProductTailoringPublishedMessageBuilder builder() { + return ProductTailoringPublishedMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringPublishedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringPublishedMessageBuilder builder(final ProductTailoringPublishedMessage template) { + return ProductTailoringPublishedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringPublishedMessage(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/ProductTailoringPublishedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageBuilder.java new file mode 100644 index 00000000000..27a05d4ae09 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageBuilder.java @@ -0,0 +1,531 @@ + +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; + +/** + * ProductTailoringPublishedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringPublishedMessage productTailoringPublishedMessage = ProductTailoringPublishedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPublishedMessageBuilder 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; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder 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 ProductTailoringPublishedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

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

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPublishedMessageImpl implements ProductTailoringPublishedMessage, 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; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringPublishedMessageImpl(@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) { + 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.type = PRODUCT_TAILORING_PUBLISHED; + } + + /** + * create empty instance + */ + public ProductTailoringPublishedMessageImpl() { + this.type = PRODUCT_TAILORING_PUBLISHED; + } + + /** + *

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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringPublishedMessageImpl that = (ProductTailoringPublishedMessageImpl) 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(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) + .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) + .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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayload.java new file mode 100644 index 00000000000..95a8bd9f6f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayload.java @@ -0,0 +1,169 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Product Tailoring Publish update action.

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

+ *     ProductTailoringPublishedMessagePayload productTailoringPublishedMessagePayload = ProductTailoringPublishedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringPublishedMessagePayloadImpl.class) +public interface ProductTailoringPublishedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringPublishedMessagePayload + */ + String PRODUCT_TAILORING_PUBLISHED = "ProductTailoringPublished"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringPublishedMessagePayload + */ + public static ProductTailoringPublishedMessagePayload of() { + return new ProductTailoringPublishedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringPublishedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringPublishedMessagePayload of(final ProductTailoringPublishedMessagePayload template) { + ProductTailoringPublishedMessagePayloadImpl instance = new ProductTailoringPublishedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringPublishedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringPublishedMessagePayload deepCopy( + @Nullable final ProductTailoringPublishedMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringPublishedMessagePayloadImpl instance = new ProductTailoringPublishedMessagePayloadImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringPublishedMessagePayload + * @return builder + */ + public static ProductTailoringPublishedMessagePayloadBuilder builder() { + return ProductTailoringPublishedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringPublishedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringPublishedMessagePayloadBuilder builder( + final ProductTailoringPublishedMessagePayload template) { + return ProductTailoringPublishedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringPublishedMessagePayload( + 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/ProductTailoringPublishedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadBuilder.java new file mode 100644 index 00000000000..7fa04ddf42d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadBuilder.java @@ -0,0 +1,187 @@ + +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; + +/** + * ProductTailoringPublishedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringPublishedMessagePayload productTailoringPublishedMessagePayload = ProductTailoringPublishedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPublishedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringPublishedMessagePayloadBuilder 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 ProductTailoringPublishedMessagePayloadBuilder 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 ProductTailoringPublishedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringPublishedMessagePayloadBuilder 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 ProductTailoringPublishedMessagePayloadBuilder 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 ProductTailoringPublishedMessagePayloadBuilder 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 ProductTailoringPublishedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

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

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPublishedMessagePayloadImpl implements ProductTailoringPublishedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringPublishedMessagePayloadImpl( + @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) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.type = PRODUCT_TAILORING_PUBLISHED; + } + + /** + * create empty instance + */ + public ProductTailoringPublishedMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_PUBLISHED; + } + + /** + * + */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringPublishedMessagePayloadImpl that = (ProductTailoringPublishedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(store).append(productKey).append(product).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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessage.java new file mode 100644 index 00000000000..a9f2e165bf6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessage.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Slug update action.

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

+ *     ProductTailoringSlugSetMessage productTailoringSlugSetMessage = ProductTailoringSlugSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSlugSetMessageImpl.class) +public interface ProductTailoringSlugSetMessage extends Message { + + /** + * discriminator value for ProductTailoringSlugSetMessage + */ + String PRODUCT_TAILORING_SLUG_SET = "ProductTailoringSlugSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

The slug of the ProductTailoring before the Set Slug update action.

+ * @return oldSlug + */ + @Valid + @JsonProperty("oldSlug") + public LocalizedString getOldSlug(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ * @param oldSlug value to be set + */ + + public void setOldSlug(final LocalizedString oldSlug); + + /** + * factory method + * @return instance of ProductTailoringSlugSetMessage + */ + public static ProductTailoringSlugSetMessage of() { + return new ProductTailoringSlugSetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSlugSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSlugSetMessage of(final ProductTailoringSlugSetMessage template) { + ProductTailoringSlugSetMessageImpl instance = new ProductTailoringSlugSetMessageImpl(); + 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.setSlug(template.getSlug()); + instance.setOldSlug(template.getOldSlug()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSlugSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSlugSetMessage deepCopy(@Nullable final ProductTailoringSlugSetMessage template) { + if (template == null) { + return null; + } + ProductTailoringSlugSetMessageImpl instance = new ProductTailoringSlugSetMessageImpl(); + 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.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setOldSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldSlug())); + return instance; + } + + /** + * builder factory method for ProductTailoringSlugSetMessage + * @return builder + */ + public static ProductTailoringSlugSetMessageBuilder builder() { + return ProductTailoringSlugSetMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringSlugSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSlugSetMessageBuilder builder(final ProductTailoringSlugSetMessage template) { + return ProductTailoringSlugSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSlugSetMessage(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/ProductTailoringSlugSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageBuilder.java new file mode 100644 index 00000000000..6a79f6c8a2e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageBuilder.java @@ -0,0 +1,630 @@ + +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; + +/** + * ProductTailoringSlugSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSlugSetMessage productTailoringSlugSetMessage = ProductTailoringSlugSetMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSlugSetMessageBuilder 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; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldSlug; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder 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 ProductTailoringSlugSetMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ * @param oldSlug value to be set + * @return Builder + */ + + public ProductTailoringSlugSetMessageBuilder oldSlug( + @Nullable final com.commercetools.api.models.common.LocalizedString oldSlug) { + this.oldSlug = oldSlug; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ * @return oldSlug + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldSlug() { + return this.oldSlug; + } + + /** + * builds ProductTailoringSlugSetMessage with checking for non-null required values + * @return ProductTailoringSlugSetMessage + */ + public ProductTailoringSlugSetMessage build() { + Objects.requireNonNull(id, ProductTailoringSlugSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringSlugSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringSlugSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringSlugSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringSlugSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringSlugSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, ProductTailoringSlugSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringSlugSetMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringSlugSetMessage.class + ": product is missing"); + return new ProductTailoringSlugSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, + slug, oldSlug); + } + + /** + * builds ProductTailoringSlugSetMessage without checking for non-null required values + * @return ProductTailoringSlugSetMessage + */ + public ProductTailoringSlugSetMessage buildUnchecked() { + return new ProductTailoringSlugSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, + slug, oldSlug); + } + + /** + * factory method for an instance of ProductTailoringSlugSetMessageBuilder + * @return builder + */ + public static ProductTailoringSlugSetMessageBuilder of() { + return new ProductTailoringSlugSetMessageBuilder(); + } + + /** + * create builder for ProductTailoringSlugSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSlugSetMessageBuilder of(final ProductTailoringSlugSetMessage template) { + ProductTailoringSlugSetMessageBuilder builder = new ProductTailoringSlugSetMessageBuilder(); + 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.slug = template.getSlug(); + builder.oldSlug = template.getOldSlug(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageImpl.java new file mode 100644 index 00000000000..35b93b2d949 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageImpl.java @@ -0,0 +1,376 @@ + +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 Product Tailoring Set Slug update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSlugSetMessageImpl implements ProductTailoringSlugSetMessage, 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 com.commercetools.api.models.common.LocalizedString slug; + + private com.commercetools.api.models.common.LocalizedString oldSlug; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSlugSetMessageImpl(@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("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("oldSlug") final com.commercetools.api.models.common.LocalizedString oldSlug) { + 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.slug = slug; + this.oldSlug = oldSlug; + this.type = PRODUCT_TAILORING_SLUG_SET; + } + + /** + * create empty instance + */ + public ProductTailoringSlugSetMessageImpl() { + this.type = PRODUCT_TAILORING_SLUG_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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldSlug() { + return this.oldSlug; + } + + 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 setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setOldSlug(final com.commercetools.api.models.common.LocalizedString oldSlug) { + this.oldSlug = oldSlug; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSlugSetMessageImpl that = (ProductTailoringSlugSetMessageImpl) 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(slug, that.slug) + .append(oldSlug, that.oldSlug) + .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(slug, that.slug) + .append(oldSlug, that.oldSlug) + .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(slug) + .append(oldSlug) + .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("slug", slug) + .append("oldSlug", oldSlug) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayload.java new file mode 100644 index 00000000000..14c5c2d827b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayload.java @@ -0,0 +1,203 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +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; + +/** + *

Generated after a successful Product Tailoring Set Slug update action.

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

+ *     ProductTailoringSlugSetMessagePayload productTailoringSlugSetMessagePayload = ProductTailoringSlugSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSlugSetMessagePayloadImpl.class) +public interface ProductTailoringSlugSetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringSlugSetMessagePayload + */ + String PRODUCT_TAILORING_SLUG_SET = "ProductTailoringSlugSet"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

The slug of the ProductTailoring before the Set Slug update action.

+ * @return oldSlug + */ + @Valid + @JsonProperty("oldSlug") + public LocalizedString getOldSlug(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ * @param oldSlug value to be set + */ + + public void setOldSlug(final LocalizedString oldSlug); + + /** + * factory method + * @return instance of ProductTailoringSlugSetMessagePayload + */ + public static ProductTailoringSlugSetMessagePayload of() { + return new ProductTailoringSlugSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSlugSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSlugSetMessagePayload of(final ProductTailoringSlugSetMessagePayload template) { + ProductTailoringSlugSetMessagePayloadImpl instance = new ProductTailoringSlugSetMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setSlug(template.getSlug()); + instance.setOldSlug(template.getOldSlug()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSlugSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSlugSetMessagePayload deepCopy( + @Nullable final ProductTailoringSlugSetMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringSlugSetMessagePayloadImpl instance = new ProductTailoringSlugSetMessagePayloadImpl(); + 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.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setOldSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getOldSlug())); + return instance; + } + + /** + * builder factory method for ProductTailoringSlugSetMessagePayload + * @return builder + */ + public static ProductTailoringSlugSetMessagePayloadBuilder builder() { + return ProductTailoringSlugSetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringSlugSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSlugSetMessagePayloadBuilder builder( + final ProductTailoringSlugSetMessagePayload template) { + return ProductTailoringSlugSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSlugSetMessagePayload(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/ProductTailoringSlugSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..fc2e6da63ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadBuilder.java @@ -0,0 +1,286 @@ + +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; + +/** + * ProductTailoringSlugSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSlugSetMessagePayload productTailoringSlugSetMessagePayload = ProductTailoringSlugSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSlugSetMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + @Nullable + private com.commercetools.api.models.common.LocalizedString oldSlug; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringSlugSetMessagePayloadBuilder 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 ProductTailoringSlugSetMessagePayloadBuilder 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 ProductTailoringSlugSetMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringSlugSetMessagePayloadBuilder 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 ProductTailoringSlugSetMessagePayloadBuilder 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 ProductTailoringSlugSetMessagePayloadBuilder 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 ProductTailoringSlugSetMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

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

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ * @return oldSlug + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getOldSlug() { + return this.oldSlug; + } + + /** + * builds ProductTailoringSlugSetMessagePayload with checking for non-null required values + * @return ProductTailoringSlugSetMessagePayload + */ + public ProductTailoringSlugSetMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringSlugSetMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringSlugSetMessagePayload.class + ": product is missing"); + return new ProductTailoringSlugSetMessagePayloadImpl(store, productKey, product, slug, oldSlug); + } + + /** + * builds ProductTailoringSlugSetMessagePayload without checking for non-null required values + * @return ProductTailoringSlugSetMessagePayload + */ + public ProductTailoringSlugSetMessagePayload buildUnchecked() { + return new ProductTailoringSlugSetMessagePayloadImpl(store, productKey, product, slug, oldSlug); + } + + /** + * factory method for an instance of ProductTailoringSlugSetMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringSlugSetMessagePayloadBuilder of() { + return new ProductTailoringSlugSetMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringSlugSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSlugSetMessagePayloadBuilder of( + final ProductTailoringSlugSetMessagePayload template) { + ProductTailoringSlugSetMessagePayloadBuilder builder = new ProductTailoringSlugSetMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.slug = template.getSlug(); + builder.oldSlug = template.getOldSlug(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadImpl.java new file mode 100644 index 00000000000..687630a9d51 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadImpl.java @@ -0,0 +1,177 @@ + +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 Product Tailoring Set Slug update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSlugSetMessagePayloadImpl implements ProductTailoringSlugSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private com.commercetools.api.models.common.LocalizedString slug; + + private com.commercetools.api.models.common.LocalizedString oldSlug; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSlugSetMessagePayloadImpl( + @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("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("oldSlug") final com.commercetools.api.models.common.LocalizedString oldSlug) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.slug = slug; + this.oldSlug = oldSlug; + this.type = PRODUCT_TAILORING_SLUG_SET; + } + + /** + * create empty instance + */ + public ProductTailoringSlugSetMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_SLUG_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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + /** + *

The slug of the Product Tailoring after the Set Slug update action.

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

The slug of the ProductTailoring before the Set Slug update action.

+ */ + + public com.commercetools.api.models.common.LocalizedString getOldSlug() { + return this.oldSlug; + } + + 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 setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setOldSlug(final com.commercetools.api.models.common.LocalizedString oldSlug) { + this.oldSlug = oldSlug; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSlugSetMessagePayloadImpl that = (ProductTailoringSlugSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(slug, that.slug) + .append(oldSlug, that.oldSlug) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(slug, that.slug) + .append(oldSlug, that.oldSlug) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(slug) + .append(oldSlug) + .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("slug", slug) + .append("oldSlug", oldSlug) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessage.java new file mode 100644 index 00000000000..107e2654022 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessage.java @@ -0,0 +1,196 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Product Tailoring Unpublish update action.

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

+ *     ProductTailoringUnpublishedMessage productTailoringUnpublishedMessage = ProductTailoringUnpublishedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringUnpublishedMessageImpl.class) +public interface ProductTailoringUnpublishedMessage extends Message { + + /** + * discriminator value for ProductTailoringUnpublishedMessage + */ + String PRODUCT_TAILORING_UNPUBLISHED = "ProductTailoringUnpublished"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringUnpublishedMessage + */ + public static ProductTailoringUnpublishedMessage of() { + return new ProductTailoringUnpublishedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringUnpublishedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringUnpublishedMessage of(final ProductTailoringUnpublishedMessage template) { + ProductTailoringUnpublishedMessageImpl instance = new ProductTailoringUnpublishedMessageImpl(); + 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()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringUnpublishedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringUnpublishedMessage deepCopy( + @Nullable final ProductTailoringUnpublishedMessage template) { + if (template == null) { + return null; + } + ProductTailoringUnpublishedMessageImpl instance = new ProductTailoringUnpublishedMessageImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringUnpublishedMessage + * @return builder + */ + public static ProductTailoringUnpublishedMessageBuilder builder() { + return ProductTailoringUnpublishedMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringUnpublishedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringUnpublishedMessageBuilder builder(final ProductTailoringUnpublishedMessage template) { + return ProductTailoringUnpublishedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringUnpublishedMessage(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/ProductTailoringUnpublishedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageBuilder.java new file mode 100644 index 00000000000..398621a2011 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageBuilder.java @@ -0,0 +1,533 @@ + +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; + +/** + * ProductTailoringUnpublishedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringUnpublishedMessage productTailoringUnpublishedMessage = ProductTailoringUnpublishedMessage.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)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUnpublishedMessageBuilder 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; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

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

Value of createdBy.

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

Value of createdBy.

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

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder 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 ProductTailoringUnpublishedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + 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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ * @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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

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

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUnpublishedMessageImpl implements ProductTailoringUnpublishedMessage, 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; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringUnpublishedMessageImpl(@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) { + 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.type = PRODUCT_TAILORING_UNPUBLISHED; + } + + /** + * create empty instance + */ + public ProductTailoringUnpublishedMessageImpl() { + this.type = PRODUCT_TAILORING_UNPUBLISHED; + } + + /** + *

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; + } + + /** + *

Value of createdBy.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

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

+ */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringUnpublishedMessageImpl that = (ProductTailoringUnpublishedMessageImpl) 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(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) + .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) + .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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayload.java new file mode 100644 index 00000000000..b1e772b6c85 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayload.java @@ -0,0 +1,170 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.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; + +/** + *

Generated after a successful Product Tailoring Unpublish update action.

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

+ *     ProductTailoringUnpublishedMessagePayload productTailoringUnpublishedMessagePayload = ProductTailoringUnpublishedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringUnpublishedMessagePayloadImpl.class) +public interface ProductTailoringUnpublishedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringUnpublishedMessagePayload + */ + String PRODUCT_TAILORING_UNPUBLISHED = "ProductTailoringUnpublished"; + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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(); + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @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); + + /** + * factory method + * @return instance of ProductTailoringUnpublishedMessagePayload + */ + public static ProductTailoringUnpublishedMessagePayload of() { + return new ProductTailoringUnpublishedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringUnpublishedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringUnpublishedMessagePayload of( + final ProductTailoringUnpublishedMessagePayload template) { + ProductTailoringUnpublishedMessagePayloadImpl instance = new ProductTailoringUnpublishedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringUnpublishedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringUnpublishedMessagePayload deepCopy( + @Nullable final ProductTailoringUnpublishedMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringUnpublishedMessagePayloadImpl instance = new ProductTailoringUnpublishedMessagePayloadImpl(); + 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())); + return instance; + } + + /** + * builder factory method for ProductTailoringUnpublishedMessagePayload + * @return builder + */ + public static ProductTailoringUnpublishedMessagePayloadBuilder builder() { + return ProductTailoringUnpublishedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringUnpublishedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringUnpublishedMessagePayloadBuilder builder( + final ProductTailoringUnpublishedMessagePayload template) { + return ProductTailoringUnpublishedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringUnpublishedMessagePayload( + 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/ProductTailoringUnpublishedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadBuilder.java new file mode 100644 index 00000000000..4e077eb74b9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadBuilder.java @@ -0,0 +1,187 @@ + +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; + +/** + * ProductTailoringUnpublishedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringUnpublishedMessagePayload productTailoringUnpublishedMessagePayload = ProductTailoringUnpublishedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUnpublishedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringUnpublishedMessagePayloadBuilder 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 ProductTailoringUnpublishedMessagePayloadBuilder 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 ProductTailoringUnpublishedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ * @param productKey value to be set + * @return Builder + */ + + public ProductTailoringUnpublishedMessagePayloadBuilder 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 ProductTailoringUnpublishedMessagePayloadBuilder 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 ProductTailoringUnpublishedMessagePayloadBuilder 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 ProductTailoringUnpublishedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

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

User-defined unique identifier of the Product this Product Tailoring belongs to.

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

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUnpublishedMessagePayloadImpl + implements ProductTailoringUnpublishedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringUnpublishedMessagePayloadImpl( + @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) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.type = PRODUCT_TAILORING_UNPUBLISHED; + } + + /** + * create empty instance + */ + public ProductTailoringUnpublishedMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_UNPUBLISHED; + } + + /** + * + */ + + 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; + } + + /** + *

User-defined unique identifier of the Product this Product Tailoring belongs to.

+ */ + + 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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringUnpublishedMessagePayloadImpl that = (ProductTailoringUnpublishedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(store).append(productKey).append(product).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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoring.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoring.java new file mode 100644 index 00000000000..2902da68235 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoring.java @@ -0,0 +1,348 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.BaseResource; +import com.commercetools.api.models.common.CreatedBy; +import com.commercetools.api.models.common.LastModifiedBy; +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; + +/** + *

A single ProductTailoring representation contains the current and the staged representation of its product data tailored per Store.

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

+ *     ProductTailoring productTailoring = ProductTailoring.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .published(true)
+ *             .current(currentBuilder -> currentBuilder)
+ *             .staged(stagedBuilder -> stagedBuilder)
+ *             .hasStagedChanges(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringImpl.class) +public interface ProductTailoring extends BaseResource { + + /** + *

Unique identifier of the ProductTailoring.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Current version of the ProductTailoring.

+ * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

Date and time (UTC) the ProductTailoring was initially created.

+ * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

Date and time (UTC) the ProductTailoring was last updated.

+ * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

Present on resources created after 1 February 2019 except for events not tracked.

+ * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

Present on resources created after 1 February 2019 except for events not tracked.

+ * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

Reference to the Product the ProductTailoring belongs to.

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

true if the ProductTailoring is published.

+ * @return published + */ + @NotNull + @JsonProperty("published") + public Boolean getPublished(); + + /** + *

Current (published) data of the ProductTailoring.

+ * @return current + */ + @NotNull + @Valid + @JsonProperty("current") + public ProductTailoringData getCurrent(); + + /** + *

Staged (unpublished) data of the ProductTailoring.

+ * @return staged + */ + @NotNull + @Valid + @JsonProperty("staged") + public ProductTailoringData getStaged(); + + /** + *

true if the staged data is different from the current data.

+ * @return hasStagedChanges + */ + @NotNull + @JsonProperty("hasStagedChanges") + public Boolean getHasStagedChanges(); + + /** + *

Unique identifier of the ProductTailoring.

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

Current version of the ProductTailoring.

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

Date and time (UTC) the ProductTailoring was initially created.

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

Date and time (UTC) the ProductTailoring was last updated.

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

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + *

Present on resources created after 1 February 2019 except for events not tracked.

+ * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

Reference to the Product the ProductTailoring belongs to.

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

true if the ProductTailoring is published.

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

Current (published) data of the ProductTailoring.

+ * @param current value to be set + */ + + public void setCurrent(final ProductTailoringData current); + + /** + *

Staged (unpublished) data of the ProductTailoring.

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

true if the staged data is different from the current data.

+ * @param hasStagedChanges value to be set + */ + + public void setHasStagedChanges(final Boolean hasStagedChanges); + + /** + * factory method + * @return instance of ProductTailoring + */ + public static ProductTailoring of() { + return new ProductTailoringImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoring + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoring of(final ProductTailoring template) { + ProductTailoringImpl instance = new ProductTailoringImpl(); + 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.setKey(template.getKey()); + instance.setStore(template.getStore()); + instance.setProduct(template.getProduct()); + instance.setPublished(template.getPublished()); + instance.setCurrent(template.getCurrent()); + instance.setStaged(template.getStaged()); + instance.setHasStagedChanges(template.getHasStagedChanges()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoring + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoring deepCopy(@Nullable final ProductTailoring template) { + if (template == null) { + return null; + } + ProductTailoringImpl instance = new ProductTailoringImpl(); + 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.setKey(template.getKey()); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setPublished(template.getPublished()); + instance.setCurrent( + com.commercetools.api.models.product_tailoring.ProductTailoringData.deepCopy(template.getCurrent())); + instance.setStaged( + com.commercetools.api.models.product_tailoring.ProductTailoringData.deepCopy(template.getStaged())); + instance.setHasStagedChanges(template.getHasStagedChanges()); + return instance; + } + + /** + * builder factory method for ProductTailoring + * @return builder + */ + public static ProductTailoringBuilder builder() { + return ProductTailoringBuilder.of(); + } + + /** + * create builder for ProductTailoring instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringBuilder builder(final ProductTailoring template) { + return ProductTailoringBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoring(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/ProductTailoringBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringBuilder.java new file mode 100644 index 00000000000..e97f4b3a316 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringBuilder.java @@ -0,0 +1,536 @@ + +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; + +/** + * ProductTailoringBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoring productTailoring = ProductTailoring.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .published(true)
+ *             .current(currentBuilder -> currentBuilder)
+ *             .staged(stagedBuilder -> stagedBuilder)
+ *             .hasStagedChanges(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringBuilder 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; + + @Nullable + private String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private com.commercetools.api.models.product.ProductReference product; + + private Boolean published; + + private com.commercetools.api.models.product_tailoring.ProductTailoringData current; + + private com.commercetools.api.models.product_tailoring.ProductTailoringData staged; + + private Boolean hasStagedChanges; + + /** + *

Unique identifier of the ProductTailoring.

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

Current version of the ProductTailoring.

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

Date and time (UTC) the ProductTailoring was initially created.

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

Date and time (UTC) the ProductTailoring was last updated.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

The Store to which the ProductTailoring belongs.

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

The Store to which the ProductTailoring belongs.

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

Reference to the Product the ProductTailoring belongs to.

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

Reference to the Product the ProductTailoring belongs to.

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

Reference to the Product the ProductTailoring belongs to.

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

true if the ProductTailoring is published.

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

Current (published) data of the ProductTailoring.

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

Current (published) data of the ProductTailoring.

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

Current (published) data of the ProductTailoring.

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

Staged (unpublished) data of the ProductTailoring.

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

Staged (unpublished) data of the ProductTailoring.

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

Staged (unpublished) data of the ProductTailoring.

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

true if the staged data is different from the current data.

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

Unique identifier of the ProductTailoring.

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

Current version of the ProductTailoring.

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

Date and time (UTC) the ProductTailoring was initially created.

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

Date and time (UTC) the ProductTailoring was last updated.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

Reference to the Product the ProductTailoring belongs to.

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

true if the ProductTailoring is published.

+ * @return published + */ + + public Boolean getPublished() { + return this.published; + } + + /** + *

Current (published) data of the ProductTailoring.

+ * @return current + */ + + public com.commercetools.api.models.product_tailoring.ProductTailoringData getCurrent() { + return this.current; + } + + /** + *

Staged (unpublished) data of the ProductTailoring.

+ * @return staged + */ + + public com.commercetools.api.models.product_tailoring.ProductTailoringData getStaged() { + return this.staged; + } + + /** + *

true if the staged data is different from the current data.

+ * @return hasStagedChanges + */ + + public Boolean getHasStagedChanges() { + return this.hasStagedChanges; + } + + /** + * builds ProductTailoring with checking for non-null required values + * @return ProductTailoring + */ + public ProductTailoring build() { + Objects.requireNonNull(id, ProductTailoring.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoring.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoring.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoring.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(store, ProductTailoring.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoring.class + ": product is missing"); + Objects.requireNonNull(published, ProductTailoring.class + ": published is missing"); + Objects.requireNonNull(current, ProductTailoring.class + ": current is missing"); + Objects.requireNonNull(staged, ProductTailoring.class + ": staged is missing"); + Objects.requireNonNull(hasStagedChanges, ProductTailoring.class + ": hasStagedChanges is missing"); + return new ProductTailoringImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, store, + product, published, current, staged, hasStagedChanges); + } + + /** + * builds ProductTailoring without checking for non-null required values + * @return ProductTailoring + */ + public ProductTailoring buildUnchecked() { + return new ProductTailoringImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, store, + product, published, current, staged, hasStagedChanges); + } + + /** + * factory method for an instance of ProductTailoringBuilder + * @return builder + */ + public static ProductTailoringBuilder of() { + return new ProductTailoringBuilder(); + } + + /** + * create builder for ProductTailoring instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringBuilder of(final ProductTailoring template) { + ProductTailoringBuilder builder = new ProductTailoringBuilder(); + 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.key = template.getKey(); + builder.store = template.getStore(); + builder.product = template.getProduct(); + builder.published = template.getPublished(); + builder.current = template.getCurrent(); + builder.staged = template.getStaged(); + builder.hasStagedChanges = template.getHasStagedChanges(); + return builder; + } + +} 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 new file mode 100644 index 00000000000..3b40ac34d74 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + *

Contains all the tailored data of a Product.

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

+ *     ProductTailoringData productTailoringData = ProductTailoringData.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDataImpl.class) +public interface ProductTailoringData { + + /** + *

Tailored name of the Product.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Tailored description of the Product.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ * @param slug value to be set + */ + + public void setSlug(final LocalizedString slug); + + /** + * factory method + * @return instance of ProductTailoringData + */ + public static ProductTailoringData of() { + return new ProductTailoringDataImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringData + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringData of(final ProductTailoringData template) { + ProductTailoringDataImpl instance = new ProductTailoringDataImpl(); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setSlug(template.getSlug()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringData + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringData deepCopy(@Nullable final ProductTailoringData template) { + if (template == null) { + return null; + } + ProductTailoringDataImpl instance = new ProductTailoringDataImpl(); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + 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.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + return instance; + } + + /** + * builder factory method for ProductTailoringData + * @return builder + */ + public static ProductTailoringDataBuilder builder() { + return ProductTailoringDataBuilder.of(); + } + + /** + * create builder for ProductTailoringData instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDataBuilder builder(final ProductTailoringData template) { + return ProductTailoringDataBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringData(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/ProductTailoringDataBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java new file mode 100644 index 00000000000..1a3354580a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java @@ -0,0 +1,358 @@ + +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; + +/** + * ProductTailoringDataBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringData productTailoringData = ProductTailoringData.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDataBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaTitle; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaDescription; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + /** + *

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ * @return slug + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getSlug() { + return this.slug; + } + + /** + * builds ProductTailoringData with checking for non-null required values + * @return ProductTailoringData + */ + public ProductTailoringData build() { + return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug); + } + + /** + * builds ProductTailoringData without checking for non-null required values + * @return ProductTailoringData + */ + public ProductTailoringData buildUnchecked() { + return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug); + } + + /** + * factory method for an instance of ProductTailoringDataBuilder + * @return builder + */ + public static ProductTailoringDataBuilder of() { + return new ProductTailoringDataBuilder(); + } + + /** + * create builder for ProductTailoringData instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDataBuilder of(final ProductTailoringData template) { + ProductTailoringDataBuilder builder = new ProductTailoringDataBuilder(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.slug = template.getSlug(); + 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 new file mode 100644 index 00000000000..2165fe91665 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java @@ -0,0 +1,180 @@ + +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; + +/** + *

Contains all the tailored data of a Product.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDataImpl implements ProductTailoringData, ModelBase { + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + 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 com.commercetools.api.models.common.LocalizedString slug; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDataImpl(@JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @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) { + this.name = name; + this.description = description; + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.slug = slug; + } + + /** + * create empty instance + */ + public ProductTailoringDataImpl() { + } + + /** + *

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ */ + + public com.commercetools.api.models.common.LocalizedString getSlug() { + return this.slug; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + 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 setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDataImpl that = (ProductTailoringDataImpl) o; + + return new EqualsBuilder().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(name, that.name) + .append(description, that.description) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(slug, that.slug) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name) + .append(description) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(slug) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("description", description) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("slug", slug) + .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 new file mode 100644 index 00000000000..6e58c063f66 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java @@ -0,0 +1,285 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +import com.commercetools.api.models.product.ProductResourceIdentifier; +import com.commercetools.api.models.store.StoreResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Contains all the tailored data of a Product.

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

+ *     ProductTailoringDraft productTailoringDraft = ProductTailoringDraft.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringDraftImpl.class) +public interface ProductTailoringDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Tailored description of the Product.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

If true, the ProductTailoring is published immediately.

+ * @return publish + */ + + @JsonProperty("publish") + public Boolean getPublish(); + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ * @param publish value to be set + */ + + public void setPublish(final Boolean publish); + + /** + * factory method + * @return instance of ProductTailoringDraft + */ + public static ProductTailoringDraft of() { + return new ProductTailoringDraftImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringDraft + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringDraft of(final ProductTailoringDraft template) { + ProductTailoringDraftImpl instance = new ProductTailoringDraftImpl(); + instance.setKey(template.getKey()); + instance.setStore(template.getStore()); + instance.setProduct(template.getProduct()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setSlug(template.getSlug()); + instance.setPublish(template.getPublish()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringDraft deepCopy(@Nullable final ProductTailoringDraft template) { + if (template == null) { + return null; + } + ProductTailoringDraftImpl instance = new ProductTailoringDraftImpl(); + instance.setKey(template.getKey()); + instance.setStore(com.commercetools.api.models.store.StoreResourceIdentifier.deepCopy(template.getStore())); + instance.setProduct( + com.commercetools.api.models.product.ProductResourceIdentifier.deepCopy(template.getProduct())); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + 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.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setPublish(template.getPublish()); + return instance; + } + + /** + * builder factory method for ProductTailoringDraft + * @return builder + */ + public static ProductTailoringDraftBuilder builder() { + return ProductTailoringDraftBuilder.of(); + } + + /** + * create builder for ProductTailoringDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDraftBuilder builder(final ProductTailoringDraft template) { + return ProductTailoringDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringDraft(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/ProductTailoringDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java new file mode 100644 index 00000000000..431c3dab3af --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java @@ -0,0 +1,510 @@ + +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; + +/** + * ProductTailoringDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringDraft productTailoringDraft = ProductTailoringDraft.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDraftBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.api.models.store.StoreResourceIdentifier store; + + private com.commercetools.api.models.product.ProductResourceIdentifier product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaTitle; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaDescription; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + @Nullable + private Boolean publish; + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

The Store to which the ProductTailoring belongs.

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

The Store to which the ProductTailoring belongs.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

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

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ * @return publish + */ + + @Nullable + public Boolean getPublish() { + return this.publish; + } + + /** + * builds ProductTailoringDraft with checking for non-null required values + * @return ProductTailoringDraft + */ + 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); + } + + /** + * builds ProductTailoringDraft without checking for non-null required values + * @return ProductTailoringDraft + */ + public ProductTailoringDraft buildUnchecked() { + return new ProductTailoringDraftImpl(key, store, product, name, description, metaTitle, metaDescription, + metaKeywords, slug, publish); + } + + /** + * factory method for an instance of ProductTailoringDraftBuilder + * @return builder + */ + public static ProductTailoringDraftBuilder of() { + return new ProductTailoringDraftBuilder(); + } + + /** + * create builder for ProductTailoringDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringDraftBuilder of(final ProductTailoringDraft template) { + ProductTailoringDraftBuilder builder = new ProductTailoringDraftBuilder(); + builder.key = template.getKey(); + builder.store = template.getStore(); + builder.product = template.getProduct(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.slug = template.getSlug(); + builder.publish = template.getPublish(); + 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 new file mode 100644 index 00000000000..e4fe2daf649 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java @@ -0,0 +1,260 @@ + +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; + +/** + *

Contains all the tailored data of a Product.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringDraftImpl implements ProductTailoringDraft, ModelBase { + + private String key; + + private com.commercetools.api.models.store.StoreResourceIdentifier store; + + private com.commercetools.api.models.product.ProductResourceIdentifier product; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + 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 com.commercetools.api.models.common.LocalizedString slug; + + private Boolean publish; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("store") final com.commercetools.api.models.store.StoreResourceIdentifier store, + @JsonProperty("product") final com.commercetools.api.models.product.ProductResourceIdentifier product, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @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("publish") final Boolean publish) { + this.key = key; + this.store = store; + this.product = product; + this.name = name; + this.description = description; + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.slug = slug; + this.publish = publish; + } + + /** + * create empty instance + */ + public ProductTailoringDraftImpl() { + } + + /** + *

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ */ + + public Boolean getPublish() { + return this.publish; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setStore(final com.commercetools.api.models.store.StoreResourceIdentifier store) { + this.store = store; + } + + public void setProduct(final com.commercetools.api.models.product.ProductResourceIdentifier product) { + this.product = product; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + 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 setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setPublish(final Boolean publish) { + this.publish = publish; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringDraftImpl that = (ProductTailoringDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(store, that.store) + .append(product, that.product) + .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(publish, that.publish) + .append(key, that.key) + .append(store, that.store) + .append(product, that.product) + .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(publish, that.publish) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(store) + .append(product) + .append(name) + .append(description) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(slug) + .append(publish) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("store", store) + .append("product", product) + .append("name", name) + .append("description", description) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("slug", slug) + .append("publish", publish) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringImpl.java new file mode 100644 index 00000000000..72ece95a06a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringImpl.java @@ -0,0 +1,319 @@ + +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; + +/** + *

A single ProductTailoring representation contains the current and the staged representation of its product data tailored per Store.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImpl implements ProductTailoring, 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 String key; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private com.commercetools.api.models.product.ProductReference product; + + private Boolean published; + + private com.commercetools.api.models.product_tailoring.ProductTailoringData current; + + private com.commercetools.api.models.product_tailoring.ProductTailoringData staged; + + private Boolean hasStagedChanges; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringImpl(@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("key") final String key, + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("published") final Boolean published, + @JsonProperty("current") final com.commercetools.api.models.product_tailoring.ProductTailoringData current, + @JsonProperty("staged") final com.commercetools.api.models.product_tailoring.ProductTailoringData staged, + @JsonProperty("hasStagedChanges") final Boolean hasStagedChanges) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.key = key; + this.store = store; + this.product = product; + this.published = published; + this.current = current; + this.staged = staged; + this.hasStagedChanges = hasStagedChanges; + } + + /** + * create empty instance + */ + public ProductTailoringImpl() { + } + + /** + *

Unique identifier of the ProductTailoring.

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

Current version of the ProductTailoring.

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

Date and time (UTC) the ProductTailoring was initially created.

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

Date and time (UTC) the ProductTailoring was last updated.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

Present on resources created after 1 February 2019 except for events not tracked.

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

User-defined unique identifier of the ProductTailoring.

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

The Store to which the ProductTailoring belongs.

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

Reference to the Product the ProductTailoring belongs to.

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

true if the ProductTailoring is published.

+ */ + + public Boolean getPublished() { + return this.published; + } + + /** + *

Current (published) data of the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductTailoringData getCurrent() { + return this.current; + } + + /** + *

Staged (unpublished) data of the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductTailoringData getStaged() { + return this.staged; + } + + /** + *

true if the staged data is different from the current data.

+ */ + + public Boolean getHasStagedChanges() { + return this.hasStagedChanges; + } + + 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 setKey(final String key) { + this.key = key; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setPublished(final Boolean published) { + this.published = published; + } + + public void setCurrent(final com.commercetools.api.models.product_tailoring.ProductTailoringData current) { + this.current = current; + } + + public void setStaged(final com.commercetools.api.models.product_tailoring.ProductTailoringData staged) { + this.staged = staged; + } + + public void setHasStagedChanges(final Boolean hasStagedChanges) { + this.hasStagedChanges = hasStagedChanges; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringImpl that = (ProductTailoringImpl) 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(key, that.key) + .append(store, that.store) + .append(product, that.product) + .append(published, that.published) + .append(current, that.current) + .append(staged, that.staged) + .append(hasStagedChanges, that.hasStagedChanges) + .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(key, that.key) + .append(store, that.store) + .append(product, that.product) + .append(published, that.published) + .append(current, that.current) + .append(staged, that.staged) + .append(hasStagedChanges, that.hasStagedChanges) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(key) + .append(store) + .append(product) + .append(published) + .append(current) + .append(staged) + .append(hasStagedChanges) + .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("key", key) + .append("store", store) + .append("product", product) + .append("published", published) + .append("current", current) + .append("staged", staged) + .append("hasStagedChanges", hasStagedChanges) + .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 new file mode 100644 index 00000000000..a65346c2aec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java @@ -0,0 +1,265 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.LocalizedString; +import com.commercetools.api.models.product.ProductResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Contains all the tailored data of a Product for a specific Store.

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

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

User-defined unique identifier of the ProductTailoring.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Tailored description of the Product.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

If true, the ProductTailoring is published immediately.

+ * @return publish + */ + + @JsonProperty("publish") + public Boolean getPublish(); + + /** + *

User-defined unique identifier of the ProductTailoring.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ * @param publish value to be set + */ + + public void setPublish(final Boolean publish); + + /** + * factory method + * @return instance of ProductTailoringInStoreDraft + */ + public static ProductTailoringInStoreDraft of() { + return new ProductTailoringInStoreDraftImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringInStoreDraft + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringInStoreDraft of(final ProductTailoringInStoreDraft template) { + ProductTailoringInStoreDraftImpl instance = new ProductTailoringInStoreDraftImpl(); + instance.setKey(template.getKey()); + instance.setProduct(template.getProduct()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setSlug(template.getSlug()); + instance.setPublish(template.getPublish()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringInStoreDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringInStoreDraft deepCopy(@Nullable final ProductTailoringInStoreDraft template) { + if (template == null) { + return null; + } + ProductTailoringInStoreDraftImpl instance = new ProductTailoringInStoreDraftImpl(); + instance.setKey(template.getKey()); + instance.setProduct( + com.commercetools.api.models.product.ProductResourceIdentifier.deepCopy(template.getProduct())); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + 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.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setPublish(template.getPublish()); + return instance; + } + + /** + * builder factory method for ProductTailoringInStoreDraft + * @return builder + */ + public static ProductTailoringInStoreDraftBuilder builder() { + return ProductTailoringInStoreDraftBuilder.of(); + } + + /** + * create builder for ProductTailoringInStoreDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringInStoreDraftBuilder builder(final ProductTailoringInStoreDraft template) { + return ProductTailoringInStoreDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringInStoreDraft(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/ProductTailoringInStoreDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java new file mode 100644 index 00000000000..7e163ee88dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java @@ -0,0 +1,463 @@ + +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; + +/** + * ProductTailoringInStoreDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringInStoreDraft productTailoringInStoreDraft = ProductTailoringInStoreDraft.builder()
+ *             .product(productBuilder -> productBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringInStoreDraftBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.api.models.product.ProductResourceIdentifier product; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaTitle; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaDescription; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + @Nullable + private Boolean publish; + + /** + *

User-defined unique identifier of the ProductTailoring.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

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

User-defined unique identifier of the ProductTailoring.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ * @return publish + */ + + @Nullable + public Boolean getPublish() { + return this.publish; + } + + /** + * builds ProductTailoringInStoreDraft with checking for non-null required values + * @return ProductTailoringInStoreDraft + */ + public ProductTailoringInStoreDraft build() { + Objects.requireNonNull(product, ProductTailoringInStoreDraft.class + ": product is missing"); + return new ProductTailoringInStoreDraftImpl(key, product, name, description, metaTitle, metaDescription, + metaKeywords, slug, publish); + } + + /** + * builds ProductTailoringInStoreDraft without checking for non-null required values + * @return ProductTailoringInStoreDraft + */ + public ProductTailoringInStoreDraft buildUnchecked() { + return new ProductTailoringInStoreDraftImpl(key, product, name, description, metaTitle, metaDescription, + metaKeywords, slug, publish); + } + + /** + * factory method for an instance of ProductTailoringInStoreDraftBuilder + * @return builder + */ + public static ProductTailoringInStoreDraftBuilder of() { + return new ProductTailoringInStoreDraftBuilder(); + } + + /** + * create builder for ProductTailoringInStoreDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringInStoreDraftBuilder of(final ProductTailoringInStoreDraft template) { + ProductTailoringInStoreDraftBuilder builder = new ProductTailoringInStoreDraftBuilder(); + builder.key = template.getKey(); + builder.product = template.getProduct(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.slug = template.getSlug(); + builder.publish = template.getPublish(); + 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 new file mode 100644 index 00000000000..3e3b95dc0fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java @@ -0,0 +1,240 @@ + +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; + +/** + *

Contains all the tailored data of a Product for a specific Store.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringInStoreDraftImpl implements ProductTailoringInStoreDraft, ModelBase { + + private String key; + + private com.commercetools.api.models.product.ProductResourceIdentifier product; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + 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 com.commercetools.api.models.common.LocalizedString slug; + + private Boolean publish; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringInStoreDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("product") final com.commercetools.api.models.product.ProductResourceIdentifier product, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @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("publish") final Boolean publish) { + this.key = key; + this.product = product; + this.name = name; + this.description = description; + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.slug = slug; + this.publish = publish; + } + + /** + * create empty instance + */ + public ProductTailoringInStoreDraftImpl() { + } + + /** + *

User-defined unique identifier of the ProductTailoring.

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

ResourceIdentifier of the Product the ProductTailoring belongs to.

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

Tailored name of the Product.

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

Tailored description of the Product.

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

Tailored title of the Product used by external search engines for improved search engine performance.

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

Tailored description of the Product used by external search engines for improved search engine performance.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

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

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

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

If true, the ProductTailoring is published immediately.

+ */ + + public Boolean getPublish() { + return this.publish; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setProduct(final com.commercetools.api.models.product.ProductResourceIdentifier product) { + this.product = product; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + 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 setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + public void setPublish(final Boolean publish) { + this.publish = publish; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringInStoreDraftImpl that = (ProductTailoringInStoreDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(product, that.product) + .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(publish, that.publish) + .append(key, that.key) + .append(product, that.product) + .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(publish, that.publish) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(product) + .append(name) + .append(description) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(slug) + .append(publish) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("product", product) + .append("name", name) + .append("description", description) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("slug", slug) + .append("publish", publish) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponse.java new file mode 100644 index 00000000000..3ec1a14282a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponse.java @@ -0,0 +1,208 @@ + +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 javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

PagedQueryResult with results containing an array of ProductTailoring.

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

+ *     ProductTailoringPagedQueryResponse productTailoringPagedQueryResponse = ProductTailoringPagedQueryResponse.builder()
+ *             .limit(0.3)
+ *             .offset(0.3)
+ *             .count(0.3)
+ *             .plusResults(resultsBuilder -> resultsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringPagedQueryResponseImpl.class) +public interface ProductTailoringPagedQueryResponse { + + /** + *

Number of results requested.

+ * @return limit + */ + @NotNull + @JsonProperty("limit") + public Long getLimit(); + + /** + *

Number of elements skipped.

+ * @return offset + */ + @NotNull + @JsonProperty("offset") + public Long getOffset(); + + /** + *

Actual number of results returned.

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

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

+ * @return total + */ + + @JsonProperty("total") + public Long getTotal(); + + /** + *

ProductTailoring list matching the query.

+ * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

Number of results requested.

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

Number of elements skipped.

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

Actual number of results returned.

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

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

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

ProductTailoring list matching the query.

+ * @param results values to be set + */ + + @JsonIgnore + public void setResults(final ProductTailoring... results); + + /** + *

ProductTailoring list matching the query.

+ * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of ProductTailoringPagedQueryResponse + */ + public static ProductTailoringPagedQueryResponse of() { + return new ProductTailoringPagedQueryResponseImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringPagedQueryResponse of(final ProductTailoringPagedQueryResponse template) { + ProductTailoringPagedQueryResponseImpl instance = new ProductTailoringPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringPagedQueryResponse deepCopy( + @Nullable final ProductTailoringPagedQueryResponse template) { + if (template == null) { + return null; + } + ProductTailoringPagedQueryResponseImpl instance = new ProductTailoringPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductTailoring::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringPagedQueryResponse + * @return builder + */ + public static ProductTailoringPagedQueryResponseBuilder builder() { + return ProductTailoringPagedQueryResponseBuilder.of(); + } + + /** + * create builder for ProductTailoringPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringPagedQueryResponseBuilder builder(final ProductTailoringPagedQueryResponse template) { + return ProductTailoringPagedQueryResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringPagedQueryResponse(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/ProductTailoringPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseBuilder.java new file mode 100644 index 00000000000..8fb9be3594e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseBuilder.java @@ -0,0 +1,265 @@ + +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; + +/** + * ProductTailoringPagedQueryResponseBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringPagedQueryResponse productTailoringPagedQueryResponse = ProductTailoringPagedQueryResponse.builder()
+ *             .limit(0.3)
+ *             .offset(0.3)
+ *             .count(0.3)
+ *             .plusResults(resultsBuilder -> resultsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPagedQueryResponseBuilder implements Builder { + + private Long limit; + + private Long offset; + + private Long count; + + @Nullable + private Long total; + + private java.util.List results; + + /** + *

Number of results requested.

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

Number of elements skipped.

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

Actual number of results returned.

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

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

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

ProductTailoring list matching the query.

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

ProductTailoring list matching the query.

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

ProductTailoring list matching the query.

+ * @param results value to be set + * @return Builder + */ + + public ProductTailoringPagedQueryResponseBuilder plusResults( + final com.commercetools.api.models.product_tailoring.ProductTailoring... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

ProductTailoring list matching the query.

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

ProductTailoring list matching the query.

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

ProductTailoring list matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public ProductTailoringPagedQueryResponseBuilder addResults( + Function builder) { + return plusResults(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringBuilder.of())); + } + + /** + *

ProductTailoring list matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public ProductTailoringPagedQueryResponseBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringBuilder.of())); + } + + /** + *

Number of results requested.

+ * @return limit + */ + + public Long getLimit() { + return this.limit; + } + + /** + *

Number of elements skipped.

+ * @return offset + */ + + public Long getOffset() { + return this.offset; + } + + /** + *

Actual number of results returned.

+ * @return count + */ + + public Long getCount() { + return this.count; + } + + /** + *

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

+ * @return total + */ + + @Nullable + public Long getTotal() { + return this.total; + } + + /** + *

ProductTailoring list matching the query.

+ * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds ProductTailoringPagedQueryResponse with checking for non-null required values + * @return ProductTailoringPagedQueryResponse + */ + public ProductTailoringPagedQueryResponse build() { + Objects.requireNonNull(limit, ProductTailoringPagedQueryResponse.class + ": limit is missing"); + Objects.requireNonNull(offset, ProductTailoringPagedQueryResponse.class + ": offset is missing"); + Objects.requireNonNull(count, ProductTailoringPagedQueryResponse.class + ": count is missing"); + Objects.requireNonNull(results, ProductTailoringPagedQueryResponse.class + ": results is missing"); + return new ProductTailoringPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * builds ProductTailoringPagedQueryResponse without checking for non-null required values + * @return ProductTailoringPagedQueryResponse + */ + public ProductTailoringPagedQueryResponse buildUnchecked() { + return new ProductTailoringPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of ProductTailoringPagedQueryResponseBuilder + * @return builder + */ + public static ProductTailoringPagedQueryResponseBuilder of() { + return new ProductTailoringPagedQueryResponseBuilder(); + } + + /** + * create builder for ProductTailoringPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringPagedQueryResponseBuilder of(final ProductTailoringPagedQueryResponse template) { + ProductTailoringPagedQueryResponseBuilder builder = new ProductTailoringPagedQueryResponseBuilder(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.count = template.getCount(); + builder.total = template.getTotal(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseImpl.java new file mode 100644 index 00000000000..90907ea6c6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseImpl.java @@ -0,0 +1,164 @@ + +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; + +/** + *

PagedQueryResult with results containing an array of ProductTailoring.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPagedQueryResponseImpl implements ProductTailoringPagedQueryResponse, ModelBase { + + private Long limit; + + private Long offset; + + private Long count; + + private Long total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringPagedQueryResponseImpl(@JsonProperty("limit") final Long limit, + @JsonProperty("offset") final Long offset, @JsonProperty("count") final Long count, + @JsonProperty("total") final Long total, + @JsonProperty("results") final java.util.List results) { + this.limit = limit; + this.offset = offset; + this.count = count; + this.total = total; + this.results = results; + } + + /** + * create empty instance + */ + public ProductTailoringPagedQueryResponseImpl() { + } + + /** + *

Number of results requested.

+ */ + + public Long getLimit() { + return this.limit; + } + + /** + *

Number of elements skipped.

+ */ + + public Long getOffset() { + return this.offset; + } + + /** + *

Actual number of results returned.

+ */ + + public Long getCount() { + return this.count; + } + + /** + *

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

+ */ + + public Long getTotal() { + return this.total; + } + + /** + *

ProductTailoring list matching the query.

+ */ + + public java.util.List getResults() { + return this.results; + } + + public void setLimit(final Long limit) { + this.limit = limit; + } + + public void setOffset(final Long offset) { + this.offset = offset; + } + + public void setCount(final Long count) { + this.count = count; + } + + public void setTotal(final Long total) { + this.total = total; + } + + public void setResults(final com.commercetools.api.models.product_tailoring.ProductTailoring... 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; + + ProductTailoringPagedQueryResponseImpl that = (ProductTailoringPagedQueryResponseImpl) o; + + return new EqualsBuilder().append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(limit) + .append(offset) + .append(count) + .append(total) + .append(results) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) + .append("offset", offset) + .append("count", count) + .append("total", total) + .append("results", results) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishAction.java new file mode 100644 index 00000000000..0c2659a7c96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishAction.java @@ -0,0 +1,107 @@ + +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; + +/** + *

Publishes the staged data of the ProductTailoring to current. Sets hasStagedChanges to false. Generates the ProductTailoringPublished Message.

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

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

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

Publishes the staged data of the ProductTailoring to current. Sets hasStagedChanges to false. Generates the ProductTailoringPublished Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringPublishActionImpl implements ProductTailoringPublishAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringPublishActionImpl() { + this.action = PUBLISH; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringPublishActionImpl that = (ProductTailoringPublishActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReference.java new file mode 100644 index 00000000000..0f868f7d603 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReference.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Reference to a ProductTailoring.

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

+ *     ProductTailoringReference productTailoringReference = ProductTailoringReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringReferenceImpl.class) +public interface ProductTailoringReference extends Reference { + + /** + * discriminator value for ProductTailoringReference + */ + String PRODUCT_TAILORING = "product-tailoring"; + + /** + *

Unique identifier of the referenced ProductTailoring.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

+ * @return obj + */ + @Valid + @JsonProperty("obj") + public ProductTailoring getObj(); + + /** + *

Unique identifier of the referenced ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

+ * @param obj value to be set + */ + + public void setObj(final ProductTailoring obj); + + /** + * factory method + * @return instance of ProductTailoringReference + */ + public static ProductTailoringReference of() { + return new ProductTailoringReferenceImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringReference + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringReference of(final ProductTailoringReference template) { + ProductTailoringReferenceImpl instance = new ProductTailoringReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(template.getObj()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringReference deepCopy(@Nullable final ProductTailoringReference template) { + if (template == null) { + return null; + } + ProductTailoringReferenceImpl instance = new ProductTailoringReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(com.commercetools.api.models.product_tailoring.ProductTailoring.deepCopy(template.getObj())); + return instance; + } + + /** + * builder factory method for ProductTailoringReference + * @return builder + */ + public static ProductTailoringReferenceBuilder builder() { + return ProductTailoringReferenceBuilder.of(); + } + + /** + * create builder for ProductTailoringReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringReferenceBuilder builder(final ProductTailoringReference template) { + return ProductTailoringReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringReference(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/ProductTailoringReferenceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceBuilder.java new file mode 100644 index 00000000000..a85d7b7d341 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceBuilder.java @@ -0,0 +1,135 @@ + +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; + +/** + * ProductTailoringReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringReference productTailoringReference = ProductTailoringReference.builder()
+ *             .id("{id}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringReferenceBuilder implements Builder { + + private String id; + + @Nullable + private com.commercetools.api.models.product_tailoring.ProductTailoring obj; + + /** + *

Unique identifier of the referenced ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

+ * @param obj value to be set + * @return Builder + */ + + public ProductTailoringReferenceBuilder obj( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoring obj) { + this.obj = obj; + return this; + } + + /** + *

Unique identifier of the referenced ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

+ * @return obj + */ + + @Nullable + public com.commercetools.api.models.product_tailoring.ProductTailoring getObj() { + return this.obj; + } + + /** + * builds ProductTailoringReference with checking for non-null required values + * @return ProductTailoringReference + */ + public ProductTailoringReference build() { + Objects.requireNonNull(id, ProductTailoringReference.class + ": id is missing"); + return new ProductTailoringReferenceImpl(id, obj); + } + + /** + * builds ProductTailoringReference without checking for non-null required values + * @return ProductTailoringReference + */ + public ProductTailoringReference buildUnchecked() { + return new ProductTailoringReferenceImpl(id, obj); + } + + /** + * factory method for an instance of ProductTailoringReferenceBuilder + * @return builder + */ + public static ProductTailoringReferenceBuilder of() { + return new ProductTailoringReferenceBuilder(); + } + + /** + * create builder for ProductTailoringReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringReferenceBuilder of(final ProductTailoringReference template) { + ProductTailoringReferenceBuilder builder = new ProductTailoringReferenceBuilder(); + builder.id = template.getId(); + builder.obj = template.getObj(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceImpl.java new file mode 100644 index 00000000000..1f2af1dc3aa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceImpl.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Reference to a ProductTailoring.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringReferenceImpl implements ProductTailoringReference, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private com.commercetools.api.models.product_tailoring.ProductTailoring obj; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringReferenceImpl(@JsonProperty("id") final String id, + @JsonProperty("obj") final com.commercetools.api.models.product_tailoring.ProductTailoring obj) { + this.id = id; + this.obj = obj; + this.typeId = ReferenceTypeId.findEnum("product-tailoring"); + } + + /** + * create empty instance + */ + public ProductTailoringReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("product-tailoring"); + } + + /** + *

Type of referenced resource.

+ */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced ProductTailoring.

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

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductTailoring getObj() { + return this.obj; + } + + public void setId(final String id) { + this.id = id; + } + + public void setObj(final com.commercetools.api.models.product_tailoring.ProductTailoring obj) { + this.obj = obj; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringReferenceImpl that = (ProductTailoringReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(obj).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("obj", obj) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifier.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifier.java new file mode 100644 index 00000000000..57d5e8fe11e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifier.java @@ -0,0 +1,143 @@ + +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.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

ResourceIdentifier to a ProductTailoring.

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

+ *     ProductTailoringResourceIdentifier productTailoringResourceIdentifier = ProductTailoringResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringResourceIdentifierImpl.class) +public interface ProductTailoringResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for ProductTailoringResourceIdentifier + */ + String PRODUCT_TAILORING = "product-tailoring"; + + /** + *

Unique identifier of the referenced ProductTailoring. Either id or key is required.

+ * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

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

Unique identifier of the referenced ProductTailoring. Either id or key is required.

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

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of ProductTailoringResourceIdentifier + */ + public static ProductTailoringResourceIdentifier of() { + return new ProductTailoringResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringResourceIdentifier of(final ProductTailoringResourceIdentifier template) { + ProductTailoringResourceIdentifierImpl instance = new ProductTailoringResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringResourceIdentifier deepCopy( + @Nullable final ProductTailoringResourceIdentifier template) { + if (template == null) { + return null; + } + ProductTailoringResourceIdentifierImpl instance = new ProductTailoringResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringResourceIdentifier + * @return builder + */ + public static ProductTailoringResourceIdentifierBuilder builder() { + return ProductTailoringResourceIdentifierBuilder.of(); + } + + /** + * create builder for ProductTailoringResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringResourceIdentifierBuilder builder(final ProductTailoringResourceIdentifier template) { + return ProductTailoringResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringResourceIdentifier(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/ProductTailoringResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierBuilder.java new file mode 100644 index 00000000000..dd0853d4e6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +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; + +/** + * ProductTailoringResourceIdentifierBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringResourceIdentifier productTailoringResourceIdentifier = ProductTailoringResourceIdentifier.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

Unique identifier of the referenced ProductTailoring. Either id or key is required.

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

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

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

Unique identifier of the referenced ProductTailoring. Either id or key is required.

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

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds ProductTailoringResourceIdentifier with checking for non-null required values + * @return ProductTailoringResourceIdentifier + */ + public ProductTailoringResourceIdentifier build() { + return new ProductTailoringResourceIdentifierImpl(id, key); + } + + /** + * builds ProductTailoringResourceIdentifier without checking for non-null required values + * @return ProductTailoringResourceIdentifier + */ + public ProductTailoringResourceIdentifier buildUnchecked() { + return new ProductTailoringResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of ProductTailoringResourceIdentifierBuilder + * @return builder + */ + public static ProductTailoringResourceIdentifierBuilder of() { + return new ProductTailoringResourceIdentifierBuilder(); + } + + /** + * create builder for ProductTailoringResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringResourceIdentifierBuilder of(final ProductTailoringResourceIdentifier template) { + ProductTailoringResourceIdentifierBuilder builder = new ProductTailoringResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierImpl.java new file mode 100644 index 00000000000..b15718b90ff --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierImpl.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

ResourceIdentifier to a ProductTailoring.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringResourceIdentifierImpl implements ProductTailoringResourceIdentifier, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("product-tailoring"); + } + + /** + * create empty instance + */ + public ProductTailoringResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("product-tailoring"); + } + + /** + *

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

+ */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

Unique identifier of the referenced ProductTailoring. Either id or key is required.

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

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

+ */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringResourceIdentifierImpl that = (ProductTailoringResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionAction.java new file mode 100644 index 00000000000..a2fbb5e0827 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionAction.java @@ -0,0 +1,146 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + *

Generates the ProductTailoringDescriptionSet Message.

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

+ *     ProductTailoringSetDescriptionAction productTailoringSetDescriptionAction = ProductTailoringSetDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetDescriptionActionImpl.class) +public interface ProductTailoringSetDescriptionAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetDescriptionAction + */ + String SET_DESCRIPTION = "setDescription"; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetDescriptionAction + */ + public static ProductTailoringSetDescriptionAction of() { + return new ProductTailoringSetDescriptionActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetDescriptionAction of(final ProductTailoringSetDescriptionAction template) { + ProductTailoringSetDescriptionActionImpl instance = new ProductTailoringSetDescriptionActionImpl(); + instance.setDescription(template.getDescription()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetDescriptionAction deepCopy( + @Nullable final ProductTailoringSetDescriptionAction template) { + if (template == null) { + return null; + } + ProductTailoringSetDescriptionActionImpl instance = new ProductTailoringSetDescriptionActionImpl(); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetDescriptionAction + * @return builder + */ + public static ProductTailoringSetDescriptionActionBuilder builder() { + return ProductTailoringSetDescriptionActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetDescriptionActionBuilder builder( + final ProductTailoringSetDescriptionAction template) { + return ProductTailoringSetDescriptionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetDescriptionAction(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/ProductTailoringSetDescriptionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionBuilder.java new file mode 100644 index 00000000000..9e7f84c88fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionBuilder.java @@ -0,0 +1,135 @@ + +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; + +/** + * ProductTailoringSetDescriptionActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetDescriptionAction productTailoringSetDescriptionAction = ProductTailoringSetDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetDescriptionActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the description value + * @return Builder + */ + + public ProductTailoringSetDescriptionActionBuilder 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 ProductTailoringSetDescriptionActionBuilder 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 ProductTailoringSetDescriptionActionBuilder description( + @Nullable final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

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

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

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; + } + + /** + *

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetDescriptionAction with checking for non-null required values + * @return ProductTailoringSetDescriptionAction + */ + public ProductTailoringSetDescriptionAction build() { + return new ProductTailoringSetDescriptionActionImpl(description, staged); + } + + /** + * builds ProductTailoringSetDescriptionAction without checking for non-null required values + * @return ProductTailoringSetDescriptionAction + */ + public ProductTailoringSetDescriptionAction buildUnchecked() { + return new ProductTailoringSetDescriptionActionImpl(description, staged); + } + + /** + * factory method for an instance of ProductTailoringSetDescriptionActionBuilder + * @return builder + */ + public static ProductTailoringSetDescriptionActionBuilder of() { + return new ProductTailoringSetDescriptionActionBuilder(); + } + + /** + * create builder for ProductTailoringSetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetDescriptionActionBuilder of(final ProductTailoringSetDescriptionAction template) { + ProductTailoringSetDescriptionActionBuilder builder = new ProductTailoringSetDescriptionActionBuilder(); + builder.description = template.getDescription(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionImpl.java new file mode 100644 index 00000000000..3258eb4f9f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionImpl.java @@ -0,0 +1,114 @@ + +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; + +/** + *

Generates the ProductTailoringDescriptionSet Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetDescriptionActionImpl implements ProductTailoringSetDescriptionAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString description; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetDescriptionActionImpl( + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @JsonProperty("staged") final Boolean staged) { + this.description = description; + this.staged = staged; + this.action = SET_DESCRIPTION; + } + + /** + * create empty instance + */ + public ProductTailoringSetDescriptionActionImpl() { + this.action = SET_DESCRIPTION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + 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; + + ProductTailoringSetDescriptionActionImpl that = (ProductTailoringSetDescriptionActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(description, that.description) + .append(staged, that.staged) + .append(action, that.action) + .append(description, that.description) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(description).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("description", description) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesAction.java new file mode 100644 index 00000000000..1e1f703ad07 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesAction.java @@ -0,0 +1,182 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + *

Updates all meta attributes at the same time.

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

+ *     ProductTailoringSetMetaAttributesAction productTailoringSetMetaAttributesAction = ProductTailoringSetMetaAttributesAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetMetaAttributesActionImpl.class) +public interface ProductTailoringSetMetaAttributesAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetMetaAttributesAction + */ + String SET_META_ATTRIBUTES = "setMetaAttributes"; + + /** + *

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetMetaAttributesAction + */ + public static ProductTailoringSetMetaAttributesAction of() { + return new ProductTailoringSetMetaAttributesActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetMetaAttributesAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetMetaAttributesAction of(final ProductTailoringSetMetaAttributesAction template) { + ProductTailoringSetMetaAttributesActionImpl instance = new ProductTailoringSetMetaAttributesActionImpl(); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetMetaAttributesAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetMetaAttributesAction deepCopy( + @Nullable final ProductTailoringSetMetaAttributesAction template) { + if (template == null) { + return null; + } + ProductTailoringSetMetaAttributesActionImpl instance = new ProductTailoringSetMetaAttributesActionImpl(); + 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.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetMetaAttributesAction + * @return builder + */ + public static ProductTailoringSetMetaAttributesActionBuilder builder() { + return ProductTailoringSetMetaAttributesActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetMetaAttributesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaAttributesActionBuilder builder( + final ProductTailoringSetMetaAttributesAction template) { + return ProductTailoringSetMetaAttributesActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetMetaAttributesAction( + 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/ProductTailoringSetMetaAttributesActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionBuilder.java new file mode 100644 index 00000000000..75ca2aac5f2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionBuilder.java @@ -0,0 +1,237 @@ + +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; + +/** + * ProductTailoringSetMetaAttributesActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaAttributesAction productTailoringSetMetaAttributesAction = ProductTailoringSetMetaAttributesAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaAttributesActionBuilder + implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaTitle; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaDescription; + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaTitle value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder metaTitle( + Function builder) { + this.metaTitle = 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 metaTitle value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder withMetaTitle( + Function builder) { + this.metaTitle = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaDescription value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder metaDescription( + Function builder) { + this.metaDescription = 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 metaDescription value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder withMetaDescription( + Function builder) { + this.metaDescription = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaKeywords value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder metaKeywords( + Function builder) { + this.metaKeywords = 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 metaKeywords value + * @return Builder + */ + + public ProductTailoringSetMetaAttributesActionBuilder withMetaKeywords( + Function builder) { + this.metaKeywords = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetMetaAttributesAction with checking for non-null required values + * @return ProductTailoringSetMetaAttributesAction + */ + public ProductTailoringSetMetaAttributesAction build() { + return new ProductTailoringSetMetaAttributesActionImpl(metaTitle, metaDescription, metaKeywords, staged); + } + + /** + * builds ProductTailoringSetMetaAttributesAction without checking for non-null required values + * @return ProductTailoringSetMetaAttributesAction + */ + public ProductTailoringSetMetaAttributesAction buildUnchecked() { + return new ProductTailoringSetMetaAttributesActionImpl(metaTitle, metaDescription, metaKeywords, staged); + } + + /** + * factory method for an instance of ProductTailoringSetMetaAttributesActionBuilder + * @return builder + */ + public static ProductTailoringSetMetaAttributesActionBuilder of() { + return new ProductTailoringSetMetaAttributesActionBuilder(); + } + + /** + * create builder for ProductTailoringSetMetaAttributesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaAttributesActionBuilder of( + final ProductTailoringSetMetaAttributesAction template) { + ProductTailoringSetMetaAttributesActionBuilder builder = new ProductTailoringSetMetaAttributesActionBuilder(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionImpl.java new file mode 100644 index 00000000000..8aebdc16431 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionImpl.java @@ -0,0 +1,157 @@ + +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; + +/** + *

Updates all meta attributes at the same time.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaAttributesActionImpl implements ProductTailoringSetMetaAttributesAction, ModelBase { + + private String action; + + 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 Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetMetaAttributesActionImpl( + @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("staged") final Boolean staged) { + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.staged = staged; + this.action = SET_META_ATTRIBUTES; + } + + /** + * create empty instance + */ + public ProductTailoringSetMetaAttributesActionImpl() { + this.action = SET_META_ATTRIBUTES; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + 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 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; + + ProductTailoringSetMetaAttributesActionImpl that = (ProductTailoringSetMetaAttributesActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(staged, that.staged) + .append(action, that.action) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionAction.java new file mode 100644 index 00000000000..88cca2cb0f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionAction.java @@ -0,0 +1,147 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + * ProductTailoringSetMetaDescriptionAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaDescriptionAction productTailoringSetMetaDescriptionAction = ProductTailoringSetMetaDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetMetaDescriptionActionImpl.class) +public interface ProductTailoringSetMetaDescriptionAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetMetaDescriptionAction + */ + String SET_META_DESCRIPTION = "setMetaDescription"; + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetMetaDescriptionAction + */ + public static ProductTailoringSetMetaDescriptionAction of() { + return new ProductTailoringSetMetaDescriptionActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetMetaDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetMetaDescriptionAction of(final ProductTailoringSetMetaDescriptionAction template) { + ProductTailoringSetMetaDescriptionActionImpl instance = new ProductTailoringSetMetaDescriptionActionImpl(); + instance.setMetaDescription(template.getMetaDescription()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetMetaDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetMetaDescriptionAction deepCopy( + @Nullable final ProductTailoringSetMetaDescriptionAction template) { + if (template == null) { + return null; + } + ProductTailoringSetMetaDescriptionActionImpl instance = new ProductTailoringSetMetaDescriptionActionImpl(); + instance.setMetaDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaDescription())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetMetaDescriptionAction + * @return builder + */ + public static ProductTailoringSetMetaDescriptionActionBuilder builder() { + return ProductTailoringSetMetaDescriptionActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetMetaDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaDescriptionActionBuilder builder( + final ProductTailoringSetMetaDescriptionAction template) { + return ProductTailoringSetMetaDescriptionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetMetaDescriptionAction( + 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/ProductTailoringSetMetaDescriptionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionBuilder.java new file mode 100644 index 00000000000..95de53fbc5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionBuilder.java @@ -0,0 +1,137 @@ + +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; + +/** + * ProductTailoringSetMetaDescriptionActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaDescriptionAction productTailoringSetMetaDescriptionAction = ProductTailoringSetMetaDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaDescriptionActionBuilder + implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaDescription; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaDescription value + * @return Builder + */ + + public ProductTailoringSetMetaDescriptionActionBuilder metaDescription( + Function builder) { + this.metaDescription = 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 metaDescription value + * @return Builder + */ + + public ProductTailoringSetMetaDescriptionActionBuilder withMetaDescription( + Function builder) { + this.metaDescription = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetMetaDescriptionAction with checking for non-null required values + * @return ProductTailoringSetMetaDescriptionAction + */ + public ProductTailoringSetMetaDescriptionAction build() { + return new ProductTailoringSetMetaDescriptionActionImpl(metaDescription, staged); + } + + /** + * builds ProductTailoringSetMetaDescriptionAction without checking for non-null required values + * @return ProductTailoringSetMetaDescriptionAction + */ + public ProductTailoringSetMetaDescriptionAction buildUnchecked() { + return new ProductTailoringSetMetaDescriptionActionImpl(metaDescription, staged); + } + + /** + * factory method for an instance of ProductTailoringSetMetaDescriptionActionBuilder + * @return builder + */ + public static ProductTailoringSetMetaDescriptionActionBuilder of() { + return new ProductTailoringSetMetaDescriptionActionBuilder(); + } + + /** + * create builder for ProductTailoringSetMetaDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaDescriptionActionBuilder of( + final ProductTailoringSetMetaDescriptionAction template) { + ProductTailoringSetMetaDescriptionActionBuilder builder = new ProductTailoringSetMetaDescriptionActionBuilder(); + builder.metaDescription = template.getMetaDescription(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionImpl.java new file mode 100644 index 00000000000..18e776a96b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionImpl.java @@ -0,0 +1,115 @@ + +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; + +/** + * ProductTailoringSetMetaDescriptionAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaDescriptionActionImpl + implements ProductTailoringSetMetaDescriptionAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString metaDescription; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetMetaDescriptionActionImpl( + @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, + @JsonProperty("staged") final Boolean staged) { + this.metaDescription = metaDescription; + this.staged = staged; + this.action = SET_META_DESCRIPTION; + } + + /** + * create empty instance + */ + public ProductTailoringSetMetaDescriptionActionImpl() { + this.action = SET_META_DESCRIPTION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setMetaDescription(final com.commercetools.api.models.common.LocalizedString metaDescription) { + this.metaDescription = metaDescription; + } + + 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; + + ProductTailoringSetMetaDescriptionActionImpl that = (ProductTailoringSetMetaDescriptionActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(metaDescription, that.metaDescription) + .append(staged, that.staged) + .append(action, that.action) + .append(metaDescription, that.metaDescription) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(metaDescription).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("metaDescription", metaDescription) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsAction.java new file mode 100644 index 00000000000..3103d49a23a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsAction.java @@ -0,0 +1,146 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + * ProductTailoringSetMetaKeywordsAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaKeywordsAction productTailoringSetMetaKeywordsAction = ProductTailoringSetMetaKeywordsAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetMetaKeywordsActionImpl.class) +public interface ProductTailoringSetMetaKeywordsAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetMetaKeywordsAction + */ + String SET_META_KEYWORDS = "setMetaKeywords"; + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetMetaKeywordsAction + */ + public static ProductTailoringSetMetaKeywordsAction of() { + return new ProductTailoringSetMetaKeywordsActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetMetaKeywordsAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetMetaKeywordsAction of(final ProductTailoringSetMetaKeywordsAction template) { + ProductTailoringSetMetaKeywordsActionImpl instance = new ProductTailoringSetMetaKeywordsActionImpl(); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetMetaKeywordsAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetMetaKeywordsAction deepCopy( + @Nullable final ProductTailoringSetMetaKeywordsAction template) { + if (template == null) { + return null; + } + ProductTailoringSetMetaKeywordsActionImpl instance = new ProductTailoringSetMetaKeywordsActionImpl(); + instance.setMetaKeywords( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetMetaKeywordsAction + * @return builder + */ + public static ProductTailoringSetMetaKeywordsActionBuilder builder() { + return ProductTailoringSetMetaKeywordsActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetMetaKeywordsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaKeywordsActionBuilder builder( + final ProductTailoringSetMetaKeywordsAction template) { + return ProductTailoringSetMetaKeywordsActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetMetaKeywordsAction(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/ProductTailoringSetMetaKeywordsActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionBuilder.java new file mode 100644 index 00000000000..e7e1fd6d847 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionBuilder.java @@ -0,0 +1,136 @@ + +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; + +/** + * ProductTailoringSetMetaKeywordsActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaKeywordsAction productTailoringSetMetaKeywordsAction = ProductTailoringSetMetaKeywordsAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaKeywordsActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaKeywords value + * @return Builder + */ + + public ProductTailoringSetMetaKeywordsActionBuilder metaKeywords( + Function builder) { + this.metaKeywords = 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 metaKeywords value + * @return Builder + */ + + public ProductTailoringSetMetaKeywordsActionBuilder withMetaKeywords( + Function builder) { + this.metaKeywords = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetMetaKeywordsAction with checking for non-null required values + * @return ProductTailoringSetMetaKeywordsAction + */ + public ProductTailoringSetMetaKeywordsAction build() { + return new ProductTailoringSetMetaKeywordsActionImpl(metaKeywords, staged); + } + + /** + * builds ProductTailoringSetMetaKeywordsAction without checking for non-null required values + * @return ProductTailoringSetMetaKeywordsAction + */ + public ProductTailoringSetMetaKeywordsAction buildUnchecked() { + return new ProductTailoringSetMetaKeywordsActionImpl(metaKeywords, staged); + } + + /** + * factory method for an instance of ProductTailoringSetMetaKeywordsActionBuilder + * @return builder + */ + public static ProductTailoringSetMetaKeywordsActionBuilder of() { + return new ProductTailoringSetMetaKeywordsActionBuilder(); + } + + /** + * create builder for ProductTailoringSetMetaKeywordsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaKeywordsActionBuilder of( + final ProductTailoringSetMetaKeywordsAction template) { + ProductTailoringSetMetaKeywordsActionBuilder builder = new ProductTailoringSetMetaKeywordsActionBuilder(); + builder.metaKeywords = template.getMetaKeywords(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionImpl.java new file mode 100644 index 00000000000..46d6ff1ee19 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionImpl.java @@ -0,0 +1,114 @@ + +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; + +/** + * ProductTailoringSetMetaKeywordsAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaKeywordsActionImpl implements ProductTailoringSetMetaKeywordsAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetMetaKeywordsActionImpl( + @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, + @JsonProperty("staged") final Boolean staged) { + this.metaKeywords = metaKeywords; + this.staged = staged; + this.action = SET_META_KEYWORDS; + } + + /** + * create empty instance + */ + public ProductTailoringSetMetaKeywordsActionImpl() { + this.action = SET_META_KEYWORDS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setMetaKeywords(final com.commercetools.api.models.common.LocalizedString metaKeywords) { + this.metaKeywords = metaKeywords; + } + + 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; + + ProductTailoringSetMetaKeywordsActionImpl that = (ProductTailoringSetMetaKeywordsActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(metaKeywords, that.metaKeywords) + .append(staged, that.staged) + .append(action, that.action) + .append(metaKeywords, that.metaKeywords) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(metaKeywords).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("metaKeywords", metaKeywords) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleAction.java new file mode 100644 index 00000000000..7aa6ce819ac --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleAction.java @@ -0,0 +1,144 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + * ProductTailoringSetMetaTitleAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaTitleAction productTailoringSetMetaTitleAction = ProductTailoringSetMetaTitleAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetMetaTitleActionImpl.class) +public interface ProductTailoringSetMetaTitleAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetMetaTitleAction + */ + String SET_META_TITLE = "setMetaTitle"; + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetMetaTitleAction + */ + public static ProductTailoringSetMetaTitleAction of() { + return new ProductTailoringSetMetaTitleActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetMetaTitleAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetMetaTitleAction of(final ProductTailoringSetMetaTitleAction template) { + ProductTailoringSetMetaTitleActionImpl instance = new ProductTailoringSetMetaTitleActionImpl(); + instance.setMetaTitle(template.getMetaTitle()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetMetaTitleAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetMetaTitleAction deepCopy( + @Nullable final ProductTailoringSetMetaTitleAction template) { + if (template == null) { + return null; + } + ProductTailoringSetMetaTitleActionImpl instance = new ProductTailoringSetMetaTitleActionImpl(); + instance.setMetaTitle(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaTitle())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetMetaTitleAction + * @return builder + */ + public static ProductTailoringSetMetaTitleActionBuilder builder() { + return ProductTailoringSetMetaTitleActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetMetaTitleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaTitleActionBuilder builder(final ProductTailoringSetMetaTitleAction template) { + return ProductTailoringSetMetaTitleActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetMetaTitleAction(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/ProductTailoringSetMetaTitleActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionBuilder.java new file mode 100644 index 00000000000..5aabab1148f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionBuilder.java @@ -0,0 +1,135 @@ + +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; + +/** + * ProductTailoringSetMetaTitleActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetMetaTitleAction productTailoringSetMetaTitleAction = ProductTailoringSetMetaTitleAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaTitleActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString metaTitle; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the metaTitle value + * @return Builder + */ + + public ProductTailoringSetMetaTitleActionBuilder metaTitle( + Function builder) { + this.metaTitle = 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 metaTitle value + * @return Builder + */ + + public ProductTailoringSetMetaTitleActionBuilder withMetaTitle( + Function builder) { + this.metaTitle = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetMetaTitleAction with checking for non-null required values + * @return ProductTailoringSetMetaTitleAction + */ + public ProductTailoringSetMetaTitleAction build() { + return new ProductTailoringSetMetaTitleActionImpl(metaTitle, staged); + } + + /** + * builds ProductTailoringSetMetaTitleAction without checking for non-null required values + * @return ProductTailoringSetMetaTitleAction + */ + public ProductTailoringSetMetaTitleAction buildUnchecked() { + return new ProductTailoringSetMetaTitleActionImpl(metaTitle, staged); + } + + /** + * factory method for an instance of ProductTailoringSetMetaTitleActionBuilder + * @return builder + */ + public static ProductTailoringSetMetaTitleActionBuilder of() { + return new ProductTailoringSetMetaTitleActionBuilder(); + } + + /** + * create builder for ProductTailoringSetMetaTitleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetMetaTitleActionBuilder of(final ProductTailoringSetMetaTitleAction template) { + ProductTailoringSetMetaTitleActionBuilder builder = new ProductTailoringSetMetaTitleActionBuilder(); + builder.metaTitle = template.getMetaTitle(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionImpl.java new file mode 100644 index 00000000000..1fa63ef43ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionImpl.java @@ -0,0 +1,114 @@ + +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; + +/** + * ProductTailoringSetMetaTitleAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetMetaTitleActionImpl implements ProductTailoringSetMetaTitleAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString metaTitle; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetMetaTitleActionImpl( + @JsonProperty("metaTitle") final com.commercetools.api.models.common.LocalizedString metaTitle, + @JsonProperty("staged") final Boolean staged) { + this.metaTitle = metaTitle; + this.staged = staged; + this.action = SET_META_TITLE; + } + + /** + * create empty instance + */ + public ProductTailoringSetMetaTitleActionImpl() { + this.action = SET_META_TITLE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setMetaTitle(final com.commercetools.api.models.common.LocalizedString metaTitle) { + this.metaTitle = metaTitle; + } + + 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; + + ProductTailoringSetMetaTitleActionImpl that = (ProductTailoringSetMetaTitleActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(metaTitle, that.metaTitle) + .append(staged, that.staged) + .append(action, that.action) + .append(metaTitle, that.metaTitle) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(metaTitle).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("metaTitle", metaTitle) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameAction.java new file mode 100644 index 00000000000..d98ebc46c6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + *

Generates the ProductTailoringNameSet Message.

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

+ *     ProductTailoringSetNameAction productTailoringSetNameAction = ProductTailoringSetNameAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetNameActionImpl.class) +public interface ProductTailoringSetNameAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetNameAction + */ + String SET_NAME = "setName"; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetNameAction + */ + public static ProductTailoringSetNameAction of() { + return new ProductTailoringSetNameActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetNameAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetNameAction of(final ProductTailoringSetNameAction template) { + ProductTailoringSetNameActionImpl instance = new ProductTailoringSetNameActionImpl(); + instance.setName(template.getName()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetNameAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetNameAction deepCopy(@Nullable final ProductTailoringSetNameAction template) { + if (template == null) { + return null; + } + ProductTailoringSetNameActionImpl instance = new ProductTailoringSetNameActionImpl(); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetNameAction + * @return builder + */ + public static ProductTailoringSetNameActionBuilder builder() { + return ProductTailoringSetNameActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetNameActionBuilder builder(final ProductTailoringSetNameAction template) { + return ProductTailoringSetNameActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetNameAction(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/ProductTailoringSetNameActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionBuilder.java new file mode 100644 index 00000000000..38c3dda7234 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionBuilder.java @@ -0,0 +1,135 @@ + +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; + +/** + * ProductTailoringSetNameActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetNameAction productTailoringSetNameAction = ProductTailoringSetNameAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetNameActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the name value + * @return Builder + */ + + public ProductTailoringSetNameActionBuilder name( + Function builder) { + this.name = 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 name value + * @return Builder + */ + + public ProductTailoringSetNameActionBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetNameAction with checking for non-null required values + * @return ProductTailoringSetNameAction + */ + public ProductTailoringSetNameAction build() { + return new ProductTailoringSetNameActionImpl(name, staged); + } + + /** + * builds ProductTailoringSetNameAction without checking for non-null required values + * @return ProductTailoringSetNameAction + */ + public ProductTailoringSetNameAction buildUnchecked() { + return new ProductTailoringSetNameActionImpl(name, staged); + } + + /** + * factory method for an instance of ProductTailoringSetNameActionBuilder + * @return builder + */ + public static ProductTailoringSetNameActionBuilder of() { + return new ProductTailoringSetNameActionBuilder(); + } + + /** + * create builder for ProductTailoringSetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetNameActionBuilder of(final ProductTailoringSetNameAction template) { + ProductTailoringSetNameActionBuilder builder = new ProductTailoringSetNameActionBuilder(); + builder.name = template.getName(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionImpl.java new file mode 100644 index 00000000000..0f2065d72c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionImpl.java @@ -0,0 +1,114 @@ + +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; + +/** + *

Generates the ProductTailoringNameSet Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetNameActionImpl implements ProductTailoringSetNameAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString name; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetNameActionImpl( + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("staged") final Boolean staged) { + this.name = name; + this.staged = staged; + this.action = SET_NAME; + } + + /** + * create empty instance + */ + public ProductTailoringSetNameActionImpl() { + this.action = SET_NAME; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + 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; + + ProductTailoringSetNameActionImpl that = (ProductTailoringSetNameActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(staged, that.staged) + .append(action, that.action) + .append(name, that.name) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugAction.java new file mode 100644 index 00000000000..c72ccb5bbc5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; + +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; + +/** + *

Generates the ProductTailoringSlugSet Message.

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

+ *     ProductTailoringSetSlugAction productTailoringSetSlugAction = ProductTailoringSetSlugAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetSlugActionImpl.class) +public interface ProductTailoringSetSlugAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetSlugAction + */ + String SET_SLUG = "setSlug"; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return slug + */ + @Valid + @JsonProperty("slug") + public LocalizedString getSlug(); + + /** + *

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetSlugAction + */ + public static ProductTailoringSetSlugAction of() { + return new ProductTailoringSetSlugActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetSlugAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetSlugAction of(final ProductTailoringSetSlugAction template) { + ProductTailoringSetSlugActionImpl instance = new ProductTailoringSetSlugActionImpl(); + instance.setSlug(template.getSlug()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetSlugAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetSlugAction deepCopy(@Nullable final ProductTailoringSetSlugAction template) { + if (template == null) { + return null; + } + ProductTailoringSetSlugActionImpl instance = new ProductTailoringSetSlugActionImpl(); + instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetSlugAction + * @return builder + */ + public static ProductTailoringSetSlugActionBuilder builder() { + return ProductTailoringSetSlugActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetSlugAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetSlugActionBuilder builder(final ProductTailoringSetSlugAction template) { + return ProductTailoringSetSlugActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetSlugAction(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/ProductTailoringSetSlugActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionBuilder.java new file mode 100644 index 00000000000..6d56943d742 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionBuilder.java @@ -0,0 +1,135 @@ + +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; + +/** + * ProductTailoringSetSlugActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetSlugAction productTailoringSetSlugAction = ProductTailoringSetSlugAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetSlugActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString slug; + + @Nullable + private Boolean staged; + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @param builder function to build the slug value + * @return Builder + */ + + public ProductTailoringSetSlugActionBuilder slug( + Function builder) { + this.slug = 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 slug value + * @return Builder + */ + + public ProductTailoringSetSlugActionBuilder withSlug( + Function builder) { + this.slug = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

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

Value to set. If empty, any existing value will be removed.

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

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

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetSlugAction with checking for non-null required values + * @return ProductTailoringSetSlugAction + */ + public ProductTailoringSetSlugAction build() { + return new ProductTailoringSetSlugActionImpl(slug, staged); + } + + /** + * builds ProductTailoringSetSlugAction without checking for non-null required values + * @return ProductTailoringSetSlugAction + */ + public ProductTailoringSetSlugAction buildUnchecked() { + return new ProductTailoringSetSlugActionImpl(slug, staged); + } + + /** + * factory method for an instance of ProductTailoringSetSlugActionBuilder + * @return builder + */ + public static ProductTailoringSetSlugActionBuilder of() { + return new ProductTailoringSetSlugActionBuilder(); + } + + /** + * create builder for ProductTailoringSetSlugAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetSlugActionBuilder of(final ProductTailoringSetSlugAction template) { + ProductTailoringSetSlugActionBuilder builder = new ProductTailoringSetSlugActionBuilder(); + builder.slug = template.getSlug(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionImpl.java new file mode 100644 index 00000000000..992c698b913 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionImpl.java @@ -0,0 +1,114 @@ + +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; + +/** + *

Generates the ProductTailoringSlugSet Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetSlugActionImpl implements ProductTailoringSetSlugAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString slug; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetSlugActionImpl( + @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("staged") final Boolean staged) { + this.slug = slug; + this.staged = staged; + this.action = SET_SLUG; + } + + /** + * create empty instance + */ + public ProductTailoringSetSlugActionImpl() { + this.action = SET_SLUG; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty, any existing value will be removed.

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

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

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setSlug(final com.commercetools.api.models.common.LocalizedString slug) { + this.slug = slug; + } + + 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; + + ProductTailoringSetSlugActionImpl that = (ProductTailoringSetSlugActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(slug, that.slug) + .append(staged, that.staged) + .append(action, that.action) + .append(slug, that.slug) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(slug).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("slug", slug) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishAction.java new file mode 100644 index 00000000000..c846c1f5c40 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishAction.java @@ -0,0 +1,107 @@ + +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; + +/** + *

Unpublishes the current data of the ProductTailoring. Sets the published field to false. Generates the ProductTailoringUnpublished Message.

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

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

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

Unpublishes the current data of the ProductTailoring. Sets the published field to false. Generates the ProductTailoringUnpublished Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUnpublishActionImpl implements ProductTailoringUnpublishAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringUnpublishActionImpl() { + this.action = UNPUBLISH; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringUnpublishActionImpl that = (ProductTailoringUnpublishActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + +} 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 new file mode 100644 index 00000000000..4eea4096078 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringUpdateAction + * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     ProductTailoringUpdateAction productTailoringUpdateAction = ProductTailoringUpdateAction.publishBuilder()
+ *             .build()
+ * 
+ *
+ */ +@JsonSubTypes({ + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionImpl.class, name = ProductTailoringPublishAction.PUBLISH), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionImpl.class, name = ProductTailoringSetDescriptionAction.SET_DESCRIPTION), + @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), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleActionImpl.class, name = ProductTailoringSetMetaTitleAction.SET_META_TITLE), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetNameActionImpl.class, name = ProductTailoringSetNameAction.SET_NAME), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugActionImpl.class, name = ProductTailoringSetSlugAction.SET_SLUG), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishActionImpl.class, name = ProductTailoringUnpublishAction.UNPUBLISH) }) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = ProductTailoringUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = ProductTailoringUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ProductTailoringUpdateAction { + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + * factory method to create a deep copy of ProductTailoringUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringUpdateAction deepCopy(@Nullable final ProductTailoringUpdateAction template) { + if (template == null) { + return null; + } + 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.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.ProductTailoringSetMetaAttributesAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetNameAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetNameAction + .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoringSetNameAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugAction + .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishAction) template); + } + ProductTailoringUpdateActionImpl instance = new ProductTailoringUpdateActionImpl(); + return instance; + } + + /** + * builder for publish subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder publishBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder.of(); + } + + /** + * builder for setDescription subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder setDescriptionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder.of(); + } + + /** + * builder for setMetaAttributes subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder setMetaAttributesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder.of(); + } + + /** + * builder for setMetaDescription subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionActionBuilder setMetaDescriptionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionActionBuilder.of(); + } + + /** + * builder for setMetaKeywords subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsActionBuilder setMetaKeywordsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsActionBuilder.of(); + } + + /** + * builder for setMetaTitle subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleActionBuilder setMetaTitleBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleActionBuilder.of(); + } + + /** + * builder for setName subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetNameActionBuilder.of(); + } + + /** + * builder for setSlug subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugActionBuilder setSlugBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugActionBuilder.of(); + } + + /** + * builder for unpublish subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishActionBuilder unpublishBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringUpdateAction(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/ProductTailoringUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java new file mode 100644 index 00000000000..edd1e54069e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java @@ -0,0 +1,58 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringUpdateActionBuilder + */ +@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.ProductTailoringPublishActionBuilder publishBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder.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.ProductTailoringSetMetaAttributesActionBuilder setMetaAttributesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionActionBuilder setMetaDescriptionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsActionBuilder setMetaKeywordsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleActionBuilder setMetaTitleBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaTitleActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetNameActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugActionBuilder setSlugBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetSlugActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishActionBuilder unpublishBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringUnpublishActionBuilder.of(); + } + + /** + * factory method for an instance of ProductTailoringUpdateActionBuilder + * @return builder + */ + public static ProductTailoringUpdateActionBuilder of() { + return new ProductTailoringUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionImpl.java new file mode 100644 index 00000000000..10cc7a985c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionImpl.java @@ -0,0 +1,72 @@ + +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; + +/** + * ProductTailoringUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringUpdateActionImpl implements ProductTailoringUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public ProductTailoringUpdateActionImpl() { + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringUpdateActionImpl that = (ProductTailoringUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/ProductTailoringUpdateQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/ProductTailoringUpdateQueryBuilderDsl.java new file mode 100644 index 00000000000..0d9fd6192d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/ProductTailoringUpdateQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.cart; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringUpdateQueryBuilderDsl { + public ProductTailoringUpdateQueryBuilderDsl() { + } + + public static ProductTailoringUpdateQueryBuilderDsl of() { + return new ProductTailoringUpdateQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUpdateQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate actions( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("actions")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringUpdateActionQueryBuilderDsl + .of())), + ProductTailoringUpdateQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder actions() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("actions")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUpdateQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java index f6f28c38afb..9d9aecd4c56 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java @@ -197,6 +197,13 @@ public CombinationQueryPredicate asProductSelection BaseResourceQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoring( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.product_tailoring.ProductTailoringQueryBuilderDsl.of()), + BaseResourceQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductType( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java index cd777ce7a12..b49275fc905 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java @@ -175,6 +175,14 @@ public CombinationQueryPredicate asProductSelection( ReferenceQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoring( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringReferenceQueryBuilderDsl.of()), + ReferenceQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductType( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java index 1ae8ef7af90..df6150fb040 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java @@ -145,6 +145,14 @@ public CombinationQueryPredicate asProductSel ResourceIdentifierQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoring( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringResourceIdentifierQueryBuilderDsl + .of()), + ResourceIdentifierQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductType( Function> fn) { return new CombinationQueryPredicate<>( 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 069577d85a8..cdb5364692c 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 @@ -1010,6 +1010,57 @@ public CombinationQueryPredicate asProductStateTr MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringCreated( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringCreatedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringDeleted( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringDeletedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringDescriptionSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringNameSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringNameSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringPublished( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringPublishedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringSlugSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringSlugSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringUnpublished( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductUnpublished( 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 7066a1d1c88..59a2698d522 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 @@ -1043,6 +1043,57 @@ public CombinationQueryPredicate asProductStateTransitio MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringCreated( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ProductTailoringCreatedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringDeleted( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ProductTailoringDeletedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringDescriptionSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringDescriptionSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringNameSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ProductTailoringNameSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringPublished( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringPublishedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringSlugSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ProductTailoringSlugSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringUnpublished( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringUnpublishedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductUnpublished( 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 new file mode 100644 index 00000000000..3efe217d098 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringCreatedMessagePayloadQueryBuilderDsl { + public ProductTailoringCreatedMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringCreatedMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringCreatedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder published() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of)); + } + +} 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 new file mode 100644 index 00000000000..eb1f2891065 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java @@ -0,0 +1,154 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringCreatedMessageQueryBuilderDsl { + public ProductTailoringCreatedMessageQueryBuilderDsl() { + } + + public static ProductTailoringCreatedMessageQueryBuilderDsl of() { + return new ProductTailoringCreatedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::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())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder published() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..764831d7a79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringDeletedMessagePayloadQueryBuilderDsl { + public ProductTailoringDeletedMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringDeletedMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringDeletedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringDeletedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringDeletedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..4fcb2aa880f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDeletedMessageQueryBuilderDsl.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringDeletedMessageQueryBuilderDsl { + public ProductTailoringDeletedMessageQueryBuilderDsl() { + } + + public static ProductTailoringDeletedMessageQueryBuilderDsl of() { + return new ProductTailoringDeletedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDeletedMessageQueryBuilderDsl::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())), + ProductTailoringDeletedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..e3613360aa1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl { + public ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldDescription( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldDescription")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringDescriptionSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..8cb90f02310 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringDescriptionSetMessageQueryBuilderDsl.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringDescriptionSetMessageQueryBuilderDsl { + public ProductTailoringDescriptionSetMessageQueryBuilderDsl() { + } + + public static ProductTailoringDescriptionSetMessageQueryBuilderDsl of() { + return new ProductTailoringDescriptionSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::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())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldDescription( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldDescription")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringDescriptionSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..a13efb35274 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringNameSetMessagePayloadQueryBuilderDsl { + public ProductTailoringNameSetMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringNameSetMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringNameSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringNameSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringNameSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringNameSetMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldName( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldName")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringNameSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..e471b6e6440 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringNameSetMessageQueryBuilderDsl.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringNameSetMessageQueryBuilderDsl { + public ProductTailoringNameSetMessageQueryBuilderDsl() { + } + + public static ProductTailoringNameSetMessageQueryBuilderDsl of() { + return new ProductTailoringNameSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::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())), + ProductTailoringNameSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldName( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldName")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringNameSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..da910d29d27 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringPublishedMessagePayloadQueryBuilderDsl { + public ProductTailoringPublishedMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringPublishedMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringPublishedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringPublishedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringPublishedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..61cd7566a01 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringPublishedMessageQueryBuilderDsl.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringPublishedMessageQueryBuilderDsl { + public ProductTailoringPublishedMessageQueryBuilderDsl() { + } + + public static ProductTailoringPublishedMessageQueryBuilderDsl of() { + return new ProductTailoringPublishedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishedMessageQueryBuilderDsl::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())), + ProductTailoringPublishedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..41055571c90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSlugSetMessagePayloadQueryBuilderDsl { + public ProductTailoringSlugSetMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringSlugSetMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringSlugSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldSlug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldSlug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSlugSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..1fbf6f33e71 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringSlugSetMessageQueryBuilderDsl.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSlugSetMessageQueryBuilderDsl { + public ProductTailoringSlugSetMessageQueryBuilderDsl() { + } + + public static ProductTailoringSlugSetMessageQueryBuilderDsl of() { + return new ProductTailoringSlugSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSlugSetMessageQueryBuilderDsl::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())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldSlug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldSlug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSlugSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..676d6a2f863 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl { + public ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..eab591b85a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringUnpublishedMessageQueryBuilderDsl.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringUnpublishedMessageQueryBuilderDsl { + public ProductTailoringUnpublishedMessageQueryBuilderDsl() { + } + + public static ProductTailoringUnpublishedMessageQueryBuilderDsl of() { + return new ProductTailoringUnpublishedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishedMessageQueryBuilderDsl::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())), + ProductTailoringUnpublishedMessageQueryBuilderDsl::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 new file mode 100644 index 00000000000..75dd083a5d1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.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 ProductTailoringDataQueryBuilderDsl { + public ProductTailoringDataQueryBuilderDsl() { + } + + public static ProductTailoringDataQueryBuilderDsl of() { + return new ProductTailoringDataQueryBuilderDsl(); + } + + 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())), + ProductTailoringDataQueryBuilderDsl::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())), + ProductTailoringDataQueryBuilderDsl::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())), + ProductTailoringDataQueryBuilderDsl::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())), + ProductTailoringDataQueryBuilderDsl::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())), + ProductTailoringDataQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + 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 new file mode 100644 index 00000000000..e093a2d2ea3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringDraftQueryBuilderDsl { + public ProductTailoringDraftQueryBuilderDsl() { + } + + public static ProductTailoringDraftQueryBuilderDsl of() { + return new ProductTailoringDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDraftQueryBuilderDsl::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.StoreResourceIdentifierQueryBuilderDsl.of())), + ProductTailoringDraftQueryBuilderDsl::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.ProductResourceIdentifierQueryBuilderDsl.of())), + ProductTailoringDraftQueryBuilderDsl::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())), + ProductTailoringDraftQueryBuilderDsl::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())), + ProductTailoringDraftQueryBuilderDsl::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())), + ProductTailoringDraftQueryBuilderDsl::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())), + ProductTailoringDraftQueryBuilderDsl::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())), + ProductTailoringDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringDraftQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder publish() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("publish")), + 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 new file mode 100644 index 00000000000..d9c9bb0dd04 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java @@ -0,0 +1,91 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringInStoreDraftQueryBuilderDsl { + public ProductTailoringInStoreDraftQueryBuilderDsl() { + } + + public static ProductTailoringInStoreDraftQueryBuilderDsl of() { + return new ProductTailoringInStoreDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringInStoreDraftQueryBuilderDsl::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.ProductResourceIdentifierQueryBuilderDsl.of())), + ProductTailoringInStoreDraftQueryBuilderDsl::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())), + ProductTailoringInStoreDraftQueryBuilderDsl::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())), + ProductTailoringInStoreDraftQueryBuilderDsl::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())), + ProductTailoringInStoreDraftQueryBuilderDsl::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())), + ProductTailoringInStoreDraftQueryBuilderDsl::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())), + ProductTailoringInStoreDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringInStoreDraftQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder publish() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("publish")), + 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/ProductTailoringPagedQueryResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPagedQueryResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..af1eaf58075 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPagedQueryResponseQueryBuilderDsl.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringPagedQueryResponseQueryBuilderDsl { + public ProductTailoringPagedQueryResponseQueryBuilderDsl() { + } + + public static ProductTailoringPagedQueryResponseQueryBuilderDsl of() { + return new ProductTailoringPagedQueryResponseQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder count() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("count")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder total() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("total")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPagedQueryResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate results( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("results")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringQueryBuilderDsl.of())), + ProductTailoringPagedQueryResponseQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder results() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("results")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPagedQueryResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPublishActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPublishActionQueryBuilderDsl.java new file mode 100644 index 00000000000..c180447facb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringPublishActionQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringPublishActionQueryBuilderDsl { + public ProductTailoringPublishActionQueryBuilderDsl() { + } + + public static ProductTailoringPublishActionQueryBuilderDsl of() { + return new ProductTailoringPublishActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringPublishActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringQueryBuilderDsl.java new file mode 100644 index 00000000000..70fa4a05d1b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringQueryBuilderDsl.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringQueryBuilderDsl { + public ProductTailoringQueryBuilderDsl() { + } + + public static ProductTailoringQueryBuilderDsl of() { + return new ProductTailoringQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::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())), + ProductTailoringQueryBuilderDsl::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())), + ProductTailoringQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::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())), + ProductTailoringQueryBuilderDsl::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())), + ProductTailoringQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder published() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate current( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("current")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringDataQueryBuilderDsl.of())), + ProductTailoringQueryBuilderDsl::of); + } + + public CombinationQueryPredicate staged( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("staged")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringDataQueryBuilderDsl.of())), + ProductTailoringQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder hasStagedChanges() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("hasStagedChanges")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringReferenceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringReferenceQueryBuilderDsl.java new file mode 100644 index 00000000000..67da3d33ab6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringReferenceQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringReferenceQueryBuilderDsl { + public ProductTailoringReferenceQueryBuilderDsl() { + } + + public static ProductTailoringReferenceQueryBuilderDsl of() { + return new ProductTailoringReferenceQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringReferenceQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringReferenceQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate obj( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("obj")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringQueryBuilderDsl.of())), + ProductTailoringReferenceQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringResourceIdentifierQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringResourceIdentifierQueryBuilderDsl.java new file mode 100644 index 00000000000..2f227b60ade --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringResourceIdentifierQueryBuilderDsl.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringResourceIdentifierQueryBuilderDsl { + public ProductTailoringResourceIdentifierQueryBuilderDsl() { + } + + public static ProductTailoringResourceIdentifierQueryBuilderDsl of() { + return new ProductTailoringResourceIdentifierQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringResourceIdentifierQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetDescriptionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetDescriptionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..6379a211a03 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetDescriptionActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetDescriptionActionQueryBuilderDsl { + public ProductTailoringSetDescriptionActionQueryBuilderDsl() { + } + + public static ProductTailoringSetDescriptionActionQueryBuilderDsl of() { + return new ProductTailoringSetDescriptionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetDescriptionActionQueryBuilderDsl::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())), + ProductTailoringSetDescriptionActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetDescriptionActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaAttributesActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaAttributesActionQueryBuilderDsl.java new file mode 100644 index 00000000000..8b03578b653 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaAttributesActionQueryBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetMetaAttributesActionQueryBuilderDsl { + public ProductTailoringSetMetaAttributesActionQueryBuilderDsl() { + } + + public static ProductTailoringSetMetaAttributesActionQueryBuilderDsl of() { + return new ProductTailoringSetMetaAttributesActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaAttributesActionQueryBuilderDsl::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())), + ProductTailoringSetMetaAttributesActionQueryBuilderDsl::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())), + ProductTailoringSetMetaAttributesActionQueryBuilderDsl::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())), + ProductTailoringSetMetaAttributesActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaAttributesActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaDescriptionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaDescriptionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..6466faf65c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaDescriptionActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetMetaDescriptionActionQueryBuilderDsl { + public ProductTailoringSetMetaDescriptionActionQueryBuilderDsl() { + } + + public static ProductTailoringSetMetaDescriptionActionQueryBuilderDsl of() { + return new ProductTailoringSetMetaDescriptionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaDescriptionActionQueryBuilderDsl::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())), + ProductTailoringSetMetaDescriptionActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaDescriptionActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaKeywordsActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaKeywordsActionQueryBuilderDsl.java new file mode 100644 index 00000000000..2ca7d12139d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaKeywordsActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetMetaKeywordsActionQueryBuilderDsl { + public ProductTailoringSetMetaKeywordsActionQueryBuilderDsl() { + } + + public static ProductTailoringSetMetaKeywordsActionQueryBuilderDsl of() { + return new ProductTailoringSetMetaKeywordsActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaKeywordsActionQueryBuilderDsl::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())), + ProductTailoringSetMetaKeywordsActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaKeywordsActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaTitleActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaTitleActionQueryBuilderDsl.java new file mode 100644 index 00000000000..32bf3142aed --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetMetaTitleActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetMetaTitleActionQueryBuilderDsl { + public ProductTailoringSetMetaTitleActionQueryBuilderDsl() { + } + + public static ProductTailoringSetMetaTitleActionQueryBuilderDsl of() { + return new ProductTailoringSetMetaTitleActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaTitleActionQueryBuilderDsl::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())), + ProductTailoringSetMetaTitleActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetMetaTitleActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetNameActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetNameActionQueryBuilderDsl.java new file mode 100644 index 00000000000..594d91603b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetNameActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetNameActionQueryBuilderDsl { + public ProductTailoringSetNameActionQueryBuilderDsl() { + } + + public static ProductTailoringSetNameActionQueryBuilderDsl of() { + return new ProductTailoringSetNameActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetNameActionQueryBuilderDsl::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())), + ProductTailoringSetNameActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetNameActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetSlugActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetSlugActionQueryBuilderDsl.java new file mode 100644 index 00000000000..3414f210203 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetSlugActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetSlugActionQueryBuilderDsl { + public ProductTailoringSetSlugActionQueryBuilderDsl() { + } + + public static ProductTailoringSetSlugActionQueryBuilderDsl of() { + return new ProductTailoringSetSlugActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetSlugActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate slug( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("slug")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSetSlugActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetSlugActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUnpublishActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUnpublishActionQueryBuilderDsl.java new file mode 100644 index 00000000000..3cff4af6496 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUnpublishActionQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringUnpublishActionQueryBuilderDsl { + public ProductTailoringUnpublishActionQueryBuilderDsl() { + } + + public static ProductTailoringUnpublishActionQueryBuilderDsl of() { + return new ProductTailoringUnpublishActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUnpublishActionQueryBuilderDsl::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 new file mode 100644 index 00000000000..fc4d8866581 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java @@ -0,0 +1,90 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringUpdateActionQueryBuilderDsl { + public ProductTailoringUpdateActionQueryBuilderDsl() { + } + + public static ProductTailoringUpdateActionQueryBuilderDsl of() { + return new ProductTailoringUpdateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringUpdateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asPublish( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringPublishActionQueryBuilderDsl.of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetDescription( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetDescriptionActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetMetaAttributes( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetMetaAttributesActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetMetaDescription( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetMetaDescriptionActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetMetaKeywords( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetMetaKeywordsActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetMetaTitle( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetMetaTitleActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetName( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetNameActionQueryBuilderDsl.of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetSlug( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetSlugActionQueryBuilderDsl.of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asUnpublish( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringUnpublishActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest.java new file mode 100644 index 00000000000..c655886aa13 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest.java @@ -0,0 +1,200 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest { + 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") + .productTailoring() + .get() + .withLimit(7) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?limit=7", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withOffset(3) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?offset=3", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withWithTotal(true) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?withTotal=true", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withWhere("where") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withPredicateVar("varName", "var.varName") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/product-tailoring?var.varName=var.varName", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withSort("sort") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring?sort=sort", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/product-tailoring", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft.of()) + .createHttpRequest(), + "post", "test_projectKey/in-store/key=test_storeKey/product-tailoring", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withOffset(3), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withPredicateVar("varName", "var.varName"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get() + .withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringInStoreDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest.java new file mode 100644 index 00000000000..567ff51cdb1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest.java @@ -0,0 +1,192 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest { + 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() + .get() + .withExpand("expand") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .get() + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete() + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest.java new file mode 100644 index 00000000000..590ba7521cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.api.client.resource; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +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.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +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 ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest { + 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(); + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringTest.java new file mode 100644 index 00000000000..fcd12fbc1d1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringTest.java @@ -0,0 +1,192 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringTest { + 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() + .get() + .withExpand("expand") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .get() + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete() + .createHttpRequest(), + "delete", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyTest.java new file mode 100644 index 00000000000..177f0bc65bf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.api.client.resource; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +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.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +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 ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyTest { + 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(); + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsTest.java new file mode 100644 index 00000000000..3b748b2cd04 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.api.client.resource; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +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.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +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 ByProjectKeyInStoreKeyByStoreKeyProductsTest { + 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(); + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringByIDTest.java new file mode 100644 index 00000000000..7d99c772dd1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringByIDTest.java @@ -0,0 +1,147 @@ + +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 ByProjectKeyProductTailoringByIDTest { + 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") + .productTailoring() + .withId("test_ID") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/product-tailoring/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .get() + .createHttpRequest(), "get", "test_projectKey/product-tailoring/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/product-tailoring/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/product-tailoring/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/product-tailoring/test_ID?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", "test_projectKey/product-tailoring/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .delete() + .createHttpRequest(), "delete", "test_projectKey/product-tailoring/test_ID", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().withId("test_ID").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withId("test_ID") + .delete() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().withId("test_ID").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringKeyByKeyTest.java new file mode 100644 index 00000000000..1aa2285bdbc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringKeyByKeyTest.java @@ -0,0 +1,148 @@ + +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 ByProjectKeyProductTailoringKeyByKeyTest { + 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") + .productTailoring() + .withKey("test_key") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/product-tailoring/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .get() + .createHttpRequest(), "get", "test_projectKey/product-tailoring/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/product-tailoring/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/product-tailoring/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/product-tailoring/key=test_key?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", "test_projectKey/product-tailoring/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .delete() + .createHttpRequest(), "delete", "test_projectKey/product-tailoring/key=test_key", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .get() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().withKey("test_key").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .post(com.commercetools.api.models.cart.ProductTailoringUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .withKey("test_key") + .delete() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().withKey("test_key").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java new file mode 100644 index 00000000000..5d6bdcb88e0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java @@ -0,0 +1,141 @@ + +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 ByProjectKeyProductTailoringTest { + 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") + .productTailoring() + .get() + .withExpand("expand") + .createHttpRequest(), "get", "test_projectKey/product-tailoring?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withSort("sort") + .createHttpRequest(), "get", "test_projectKey/product-tailoring?sort=sort", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withLimit(7) + .createHttpRequest(), "get", "test_projectKey/product-tailoring?limit=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withOffset(3) + .createHttpRequest(), "get", "test_projectKey/product-tailoring?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/product-tailoring?withTotal=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withWhere("where") + .createHttpRequest(), "get", "test_projectKey/product-tailoring?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withPredicateVar("varName", "var.varName") + .createHttpRequest(), + "get", "test_projectKey/product-tailoring?var.varName=var.varName", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().createHttpRequest(), + "get", "test_projectKey/product-tailoring", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()) + .withExpand("expand") + .createHttpRequest(), "post", "test_projectKey/product-tailoring?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()) + .createHttpRequest(), "post", "test_projectKey/product-tailoring", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().get().withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().withOffset(3), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().get().withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .get() + .withPredicateVar("varName", "var.varName"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateTest.java new file mode 100644 index 00000000000..efbf8f6aa5a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/ProductTailoringUpdateTest.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.models.cart; + +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 ProductTailoringUpdateTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringUpdateBuilder builder) { + ProductTailoringUpdate productTailoringUpdate = builder.buildUnchecked(); + Assertions.assertThat(productTailoringUpdate).isInstanceOf(ProductTailoringUpdate.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringUpdate.builder().version(2L) }, + new Object[] { ProductTailoringUpdate.builder() + .actions(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringUpdateActionImpl())) } }; + } + + @Test + public void version() { + ProductTailoringUpdate value = ProductTailoringUpdate.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void actions() { + ProductTailoringUpdate value = ProductTailoringUpdate.of(); + value.setActions(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringUpdateActionImpl())); + } +} 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 new file mode 100644 index 00000000000..283988c7072 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java @@ -0,0 +1,101 @@ + +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 ProductTailoringCreatedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringCreatedMessagePayloadBuilder builder) { + ProductTailoringCreatedMessagePayload productTailoringCreatedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringCreatedMessagePayload) + .isInstanceOf(ProductTailoringCreatedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringCreatedMessagePayload.builder().key("key") }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder().published(true) } }; + } + + @Test + public void key() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void store() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.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() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.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 description() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void name() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void slug() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void published() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setPublished(true); + Assertions.assertThat(value.getPublished()).isEqualTo(true); + } +} 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 new file mode 100644 index 00000000000..ae056981550 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java @@ -0,0 +1,100 @@ + +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 ProductTailoringCreatedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringCreatedMessageBuilder builder) { + ProductTailoringCreatedMessage productTailoringCreatedMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringCreatedMessage).isInstanceOf(ProductTailoringCreatedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringCreatedMessage.builder().key("key") }, + new Object[] { ProductTailoringCreatedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringCreatedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder().published(true) } }; + } + + @Test + public void key() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void store() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.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() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.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 description() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void name() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void slug() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void published() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setPublished(true); + Assertions.assertThat(value.getPublished()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadTest.java new file mode 100644 index 00000000000..c6a8d25a191 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessagePayloadTest.java @@ -0,0 +1,58 @@ + +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 ProductTailoringDeletedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDeletedMessagePayloadBuilder builder) { + ProductTailoringDeletedMessagePayload productTailoringDeletedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringDeletedMessagePayload) + .isInstanceOf(ProductTailoringDeletedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringDeletedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringDeletedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringDeletedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringDeletedMessagePayload value = ProductTailoringDeletedMessagePayload.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() { + ProductTailoringDeletedMessagePayload value = ProductTailoringDeletedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringDeletedMessagePayload value = ProductTailoringDeletedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageTest.java new file mode 100644 index 00000000000..f3691bd5033 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDeletedMessageTest.java @@ -0,0 +1,57 @@ + +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 ProductTailoringDeletedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDeletedMessageBuilder builder) { + ProductTailoringDeletedMessage productTailoringDeletedMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringDeletedMessage).isInstanceOf(ProductTailoringDeletedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringDeletedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringDeletedMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringDeletedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringDeletedMessage value = ProductTailoringDeletedMessage.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() { + ProductTailoringDeletedMessage value = ProductTailoringDeletedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringDeletedMessage value = ProductTailoringDeletedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadTest.java new file mode 100644 index 00000000000..fd46380cd0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessagePayloadTest.java @@ -0,0 +1,79 @@ + +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 ProductTailoringDescriptionSetMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDescriptionSetMessagePayloadBuilder builder) { + ProductTailoringDescriptionSetMessagePayload productTailoringDescriptionSetMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productTailoringDescriptionSetMessagePayload) + .isInstanceOf(ProductTailoringDescriptionSetMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringDescriptionSetMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringDescriptionSetMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessagePayload.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessagePayload.builder() + .oldDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringDescriptionSetMessagePayload value = ProductTailoringDescriptionSetMessagePayload.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() { + ProductTailoringDescriptionSetMessagePayload value = ProductTailoringDescriptionSetMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringDescriptionSetMessagePayload value = ProductTailoringDescriptionSetMessagePayload.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 description() { + ProductTailoringDescriptionSetMessagePayload value = ProductTailoringDescriptionSetMessagePayload.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldDescription() { + ProductTailoringDescriptionSetMessagePayload value = ProductTailoringDescriptionSetMessagePayload.of(); + value.setOldDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageTest.java new file mode 100644 index 00000000000..e2f37484ca6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringDescriptionSetMessageTest.java @@ -0,0 +1,78 @@ + +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 ProductTailoringDescriptionSetMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDescriptionSetMessageBuilder builder) { + ProductTailoringDescriptionSetMessage productTailoringDescriptionSetMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringDescriptionSetMessage) + .isInstanceOf(ProductTailoringDescriptionSetMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringDescriptionSetMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringDescriptionSetMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessage.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDescriptionSetMessage.builder() + .oldDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringDescriptionSetMessage value = ProductTailoringDescriptionSetMessage.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() { + ProductTailoringDescriptionSetMessage value = ProductTailoringDescriptionSetMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringDescriptionSetMessage value = ProductTailoringDescriptionSetMessage.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 description() { + ProductTailoringDescriptionSetMessage value = ProductTailoringDescriptionSetMessage.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldDescription() { + ProductTailoringDescriptionSetMessage value = ProductTailoringDescriptionSetMessage.of(); + value.setOldDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadTest.java new file mode 100644 index 00000000000..8da38b429d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessagePayloadTest.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 ProductTailoringNameSetMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringNameSetMessagePayloadBuilder builder) { + ProductTailoringNameSetMessagePayload productTailoringNameSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringNameSetMessagePayload) + .isInstanceOf(ProductTailoringNameSetMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringNameSetMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringNameSetMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringNameSetMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringNameSetMessagePayload.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringNameSetMessagePayload.builder() + .oldName(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringNameSetMessagePayload value = ProductTailoringNameSetMessagePayload.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() { + ProductTailoringNameSetMessagePayload value = ProductTailoringNameSetMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringNameSetMessagePayload value = ProductTailoringNameSetMessagePayload.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 name() { + ProductTailoringNameSetMessagePayload value = ProductTailoringNameSetMessagePayload.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldName() { + ProductTailoringNameSetMessagePayload value = ProductTailoringNameSetMessagePayload.of(); + value.setOldName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldName()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageTest.java new file mode 100644 index 00000000000..292262c7bc5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringNameSetMessageTest.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 ProductTailoringNameSetMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringNameSetMessageBuilder builder) { + ProductTailoringNameSetMessage productTailoringNameSetMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringNameSetMessage).isInstanceOf(ProductTailoringNameSetMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringNameSetMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringNameSetMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringNameSetMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringNameSetMessage.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringNameSetMessage.builder() + .oldName(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringNameSetMessage value = ProductTailoringNameSetMessage.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() { + ProductTailoringNameSetMessage value = ProductTailoringNameSetMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringNameSetMessage value = ProductTailoringNameSetMessage.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 name() { + ProductTailoringNameSetMessage value = ProductTailoringNameSetMessage.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldName() { + ProductTailoringNameSetMessage value = ProductTailoringNameSetMessage.of(); + value.setOldName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldName()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadTest.java new file mode 100644 index 00000000000..64a594e181d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessagePayloadTest.java @@ -0,0 +1,58 @@ + +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 ProductTailoringPublishedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringPublishedMessagePayloadBuilder builder) { + ProductTailoringPublishedMessagePayload productTailoringPublishedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringPublishedMessagePayload) + .isInstanceOf(ProductTailoringPublishedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringPublishedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringPublishedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringPublishedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringPublishedMessagePayload value = ProductTailoringPublishedMessagePayload.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() { + ProductTailoringPublishedMessagePayload value = ProductTailoringPublishedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringPublishedMessagePayload value = ProductTailoringPublishedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageTest.java new file mode 100644 index 00000000000..1fb1e54eaaf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringPublishedMessageTest.java @@ -0,0 +1,57 @@ + +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 ProductTailoringPublishedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringPublishedMessageBuilder builder) { + ProductTailoringPublishedMessage productTailoringPublishedMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringPublishedMessage).isInstanceOf(ProductTailoringPublishedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringPublishedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringPublishedMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringPublishedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringPublishedMessage value = ProductTailoringPublishedMessage.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() { + ProductTailoringPublishedMessage value = ProductTailoringPublishedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringPublishedMessage value = ProductTailoringPublishedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadTest.java new file mode 100644 index 00000000000..d32f7fb5ac1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessagePayloadTest.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 ProductTailoringSlugSetMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSlugSetMessagePayloadBuilder builder) { + ProductTailoringSlugSetMessagePayload productTailoringSlugSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSlugSetMessagePayload) + .isInstanceOf(ProductTailoringSlugSetMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSlugSetMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringSlugSetMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringSlugSetMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringSlugSetMessagePayload.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSlugSetMessagePayload.builder() + .oldSlug(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringSlugSetMessagePayload value = ProductTailoringSlugSetMessagePayload.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() { + ProductTailoringSlugSetMessagePayload value = ProductTailoringSlugSetMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringSlugSetMessagePayload value = ProductTailoringSlugSetMessagePayload.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 slug() { + ProductTailoringSlugSetMessagePayload value = ProductTailoringSlugSetMessagePayload.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldSlug() { + ProductTailoringSlugSetMessagePayload value = ProductTailoringSlugSetMessagePayload.of(); + value.setOldSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldSlug()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageTest.java new file mode 100644 index 00000000000..63afa7cc312 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringSlugSetMessageTest.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 ProductTailoringSlugSetMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSlugSetMessageBuilder builder) { + ProductTailoringSlugSetMessage productTailoringSlugSetMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSlugSetMessage).isInstanceOf(ProductTailoringSlugSetMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSlugSetMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringSlugSetMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringSlugSetMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringSlugSetMessage.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSlugSetMessage.builder() + .oldSlug(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void store() { + ProductTailoringSlugSetMessage value = ProductTailoringSlugSetMessage.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() { + ProductTailoringSlugSetMessage value = ProductTailoringSlugSetMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringSlugSetMessage value = ProductTailoringSlugSetMessage.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 slug() { + ProductTailoringSlugSetMessage value = ProductTailoringSlugSetMessage.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void oldSlug() { + ProductTailoringSlugSetMessage value = ProductTailoringSlugSetMessage.of(); + value.setOldSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getOldSlug()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadTest.java new file mode 100644 index 00000000000..e310e269938 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessagePayloadTest.java @@ -0,0 +1,58 @@ + +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 ProductTailoringUnpublishedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringUnpublishedMessagePayloadBuilder builder) { + ProductTailoringUnpublishedMessagePayload productTailoringUnpublishedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringUnpublishedMessagePayload) + .isInstanceOf(ProductTailoringUnpublishedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringUnpublishedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringUnpublishedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringUnpublishedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringUnpublishedMessagePayload value = ProductTailoringUnpublishedMessagePayload.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() { + ProductTailoringUnpublishedMessagePayload value = ProductTailoringUnpublishedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringUnpublishedMessagePayload value = ProductTailoringUnpublishedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageTest.java new file mode 100644 index 00000000000..7b690060b47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringUnpublishedMessageTest.java @@ -0,0 +1,58 @@ + +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 ProductTailoringUnpublishedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringUnpublishedMessageBuilder builder) { + ProductTailoringUnpublishedMessage productTailoringUnpublishedMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringUnpublishedMessage) + .isInstanceOf(ProductTailoringUnpublishedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringUnpublishedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringUnpublishedMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringUnpublishedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) } }; + } + + @Test + public void store() { + ProductTailoringUnpublishedMessage value = ProductTailoringUnpublishedMessage.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() { + ProductTailoringUnpublishedMessage value = ProductTailoringUnpublishedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringUnpublishedMessage value = ProductTailoringUnpublishedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } +} 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 new file mode 100644 index 00000000000..f1d0dd7c89b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java @@ -0,0 +1,87 @@ + +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 ProductTailoringDataTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDataBuilder builder) { + ProductTailoringData productTailoringData = builder.buildUnchecked(); + Assertions.assertThat(productTailoringData).isInstanceOf(ProductTailoringData.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringData.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void name() { + ProductTailoringData value = ProductTailoringData.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + ProductTailoringData value = ProductTailoringData.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaTitle() { + ProductTailoringData value = ProductTailoringData.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() { + ProductTailoringData value = ProductTailoringData.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() { + ProductTailoringData value = ProductTailoringData.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 slug() { + ProductTailoringData value = ProductTailoringData.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).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/ProductTailoringDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java new file mode 100644 index 00000000000..695e9f5257f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java @@ -0,0 +1,122 @@ + +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 ProductTailoringDraftTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringDraftBuilder builder) { + ProductTailoringDraft productTailoringDraft = builder.buildUnchecked(); + Assertions.assertThat(productTailoringDraft).isInstanceOf(ProductTailoringDraft.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringDraft.builder().key("key") }, + new Object[] { ProductTailoringDraft.builder() + .store(new com.commercetools.api.models.store.StoreResourceIdentifierImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .product(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringDraft.builder() + .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) } }; + } + + @Test + public void key() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void store() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setStore(new com.commercetools.api.models.store.StoreResourceIdentifierImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreResourceIdentifierImpl()); + } + + @Test + public void product() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setProduct(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()); + } + + @Test + public void name() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaTitle() { + ProductTailoringDraft value = ProductTailoringDraft.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() { + ProductTailoringDraft value = ProductTailoringDraft.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() { + ProductTailoringDraft value = ProductTailoringDraft.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 slug() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void publish() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setPublish(true); + Assertions.assertThat(value.getPublish()).isEqualTo(true); + } +} 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 new file mode 100644 index 00000000000..1749d7ae964 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java @@ -0,0 +1,112 @@ + +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 ProductTailoringInStoreDraftTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringInStoreDraftBuilder builder) { + ProductTailoringInStoreDraft productTailoringInStoreDraft = builder.buildUnchecked(); + Assertions.assertThat(productTailoringInStoreDraft).isInstanceOf(ProductTailoringInStoreDraft.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringInStoreDraft.builder().key("key") }, + new Object[] { ProductTailoringInStoreDraft.builder() + .product(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .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) } }; + } + + @Test + public void key() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void product() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setProduct(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductResourceIdentifierImpl()); + } + + @Test + public void name() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaTitle() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.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() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.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() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.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 slug() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void publish() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setPublish(true); + Assertions.assertThat(value.getPublish()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseTest.java new file mode 100644 index 00000000000..e1a18e60bb4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPagedQueryResponseTest.java @@ -0,0 +1,76 @@ + +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 ProductTailoringPagedQueryResponseTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringPagedQueryResponseBuilder builder) { + ProductTailoringPagedQueryResponse productTailoringPagedQueryResponse = builder.buildUnchecked(); + Assertions.assertThat(productTailoringPagedQueryResponse) + .isInstanceOf(ProductTailoringPagedQueryResponse.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringPagedQueryResponse.builder().limit(7L) }, + new Object[] { ProductTailoringPagedQueryResponse.builder().offset(3L) }, + new Object[] { ProductTailoringPagedQueryResponse.builder().count(2L) }, + new Object[] { ProductTailoringPagedQueryResponse.builder().total(1L) }, + new Object[] { ProductTailoringPagedQueryResponse.builder() + .results(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringImpl())) } }; + } + + @Test + public void limit() { + ProductTailoringPagedQueryResponse value = ProductTailoringPagedQueryResponse.of(); + value.setLimit(7L); + Assertions.assertThat(value.getLimit()).isEqualTo(7L); + } + + @Test + public void offset() { + ProductTailoringPagedQueryResponse value = ProductTailoringPagedQueryResponse.of(); + value.setOffset(3L); + Assertions.assertThat(value.getOffset()).isEqualTo(3L); + } + + @Test + public void count() { + ProductTailoringPagedQueryResponse value = ProductTailoringPagedQueryResponse.of(); + value.setCount(2L); + Assertions.assertThat(value.getCount()).isEqualTo(2L); + } + + @Test + public void total() { + ProductTailoringPagedQueryResponse value = ProductTailoringPagedQueryResponse.of(); + value.setTotal(1L); + Assertions.assertThat(value.getTotal()).isEqualTo(1L); + } + + @Test + public void results() { + ProductTailoringPagedQueryResponse value = ProductTailoringPagedQueryResponse.of(); + value.setResults( + Collections.singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionTest.java new file mode 100644 index 00000000000..44af57199d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringPublishActionTest.java @@ -0,0 +1,13 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringPublishActionTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceTest.java new file mode 100644 index 00000000000..313951ee384 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringReferenceTest.java @@ -0,0 +1,46 @@ + +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 ProductTailoringReferenceTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringReferenceBuilder builder) { + ProductTailoringReference productTailoringReference = builder.buildUnchecked(); + Assertions.assertThat(productTailoringReference).isInstanceOf(ProductTailoringReference.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringReference.builder().id("id") }, + new Object[] { ProductTailoringReference.builder() + .obj(new com.commercetools.api.models.product_tailoring.ProductTailoringImpl()) } }; + } + + @Test + public void id() { + ProductTailoringReference value = ProductTailoringReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void obj() { + ProductTailoringReference value = ProductTailoringReference.of(); + value.setObj(new com.commercetools.api.models.product_tailoring.ProductTailoringImpl()); + Assertions.assertThat(value.getObj()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductTailoringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierTest.java new file mode 100644 index 00000000000..4a772c45b89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringResourceIdentifierTest.java @@ -0,0 +1,45 @@ + +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 ProductTailoringResourceIdentifierTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringResourceIdentifierBuilder builder) { + ProductTailoringResourceIdentifier productTailoringResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(productTailoringResourceIdentifier) + .isInstanceOf(ProductTailoringResourceIdentifier.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringResourceIdentifier.builder().id("id") }, + new Object[] { ProductTailoringResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + ProductTailoringResourceIdentifier value = ProductTailoringResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + ProductTailoringResourceIdentifier value = ProductTailoringResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionTest.java new file mode 100644 index 00000000000..e2baa829e16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetDescriptionActionTest.java @@ -0,0 +1,48 @@ + +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 ProductTailoringSetDescriptionActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetDescriptionActionBuilder builder) { + ProductTailoringSetDescriptionAction productTailoringSetDescriptionAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetDescriptionAction) + .isInstanceOf(ProductTailoringSetDescriptionAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetDescriptionAction.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetDescriptionAction.builder().staged(true) } }; + } + + @Test + public void description() { + ProductTailoringSetDescriptionAction value = ProductTailoringSetDescriptionAction.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void staged() { + ProductTailoringSetDescriptionAction value = ProductTailoringSetDescriptionAction.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/ProductTailoringSetMetaAttributesActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionTest.java new file mode 100644 index 00000000000..572f1b004b4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaAttributesActionTest.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 ProductTailoringSetMetaAttributesActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetMetaAttributesActionBuilder builder) { + ProductTailoringSetMetaAttributesAction productTailoringSetMetaAttributesAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetMetaAttributesAction) + .isInstanceOf(ProductTailoringSetMetaAttributesAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetMetaAttributesAction.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaAttributesAction.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaAttributesAction.builder() + .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaAttributesAction.builder().staged(true) } }; + } + + @Test + public void metaTitle() { + ProductTailoringSetMetaAttributesAction value = ProductTailoringSetMetaAttributesAction.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() { + ProductTailoringSetMetaAttributesAction value = ProductTailoringSetMetaAttributesAction.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() { + ProductTailoringSetMetaAttributesAction value = ProductTailoringSetMetaAttributesAction.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 staged() { + ProductTailoringSetMetaAttributesAction value = ProductTailoringSetMetaAttributesAction.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/ProductTailoringSetMetaDescriptionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionTest.java new file mode 100644 index 00000000000..089b7caec79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaDescriptionActionTest.java @@ -0,0 +1,48 @@ + +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 ProductTailoringSetMetaDescriptionActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetMetaDescriptionActionBuilder builder) { + ProductTailoringSetMetaDescriptionAction productTailoringSetMetaDescriptionAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetMetaDescriptionAction) + .isInstanceOf(ProductTailoringSetMetaDescriptionAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetMetaDescriptionAction.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaDescriptionAction.builder().staged(true) } }; + } + + @Test + public void metaDescription() { + ProductTailoringSetMetaDescriptionAction value = ProductTailoringSetMetaDescriptionAction.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 staged() { + ProductTailoringSetMetaDescriptionAction value = ProductTailoringSetMetaDescriptionAction.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/ProductTailoringSetMetaKeywordsActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionTest.java new file mode 100644 index 00000000000..16756821156 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaKeywordsActionTest.java @@ -0,0 +1,48 @@ + +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 ProductTailoringSetMetaKeywordsActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetMetaKeywordsActionBuilder builder) { + ProductTailoringSetMetaKeywordsAction productTailoringSetMetaKeywordsAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetMetaKeywordsAction) + .isInstanceOf(ProductTailoringSetMetaKeywordsAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetMetaKeywordsAction.builder() + .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaKeywordsAction.builder().staged(true) } }; + } + + @Test + public void metaKeywords() { + ProductTailoringSetMetaKeywordsAction value = ProductTailoringSetMetaKeywordsAction.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 staged() { + ProductTailoringSetMetaKeywordsAction value = ProductTailoringSetMetaKeywordsAction.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/ProductTailoringSetMetaTitleActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionTest.java new file mode 100644 index 00000000000..9c0da97fcc7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetMetaTitleActionTest.java @@ -0,0 +1,48 @@ + +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 ProductTailoringSetMetaTitleActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetMetaTitleActionBuilder builder) { + ProductTailoringSetMetaTitleAction productTailoringSetMetaTitleAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetMetaTitleAction) + .isInstanceOf(ProductTailoringSetMetaTitleAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetMetaTitleAction.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetMetaTitleAction.builder().staged(true) } }; + } + + @Test + public void metaTitle() { + ProductTailoringSetMetaTitleAction value = ProductTailoringSetMetaTitleAction.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 staged() { + ProductTailoringSetMetaTitleAction value = ProductTailoringSetMetaTitleAction.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/ProductTailoringSetNameActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionTest.java new file mode 100644 index 00000000000..0a315785c06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetNameActionTest.java @@ -0,0 +1,46 @@ + +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 ProductTailoringSetNameActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetNameActionBuilder builder) { + ProductTailoringSetNameAction productTailoringSetNameAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetNameAction).isInstanceOf(ProductTailoringSetNameAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetNameAction.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetNameAction.builder().staged(true) } }; + } + + @Test + public void name() { + ProductTailoringSetNameAction value = ProductTailoringSetNameAction.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void staged() { + ProductTailoringSetNameAction value = ProductTailoringSetNameAction.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/ProductTailoringSetSlugActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionTest.java new file mode 100644 index 00000000000..f3578d6c4b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetSlugActionTest.java @@ -0,0 +1,46 @@ + +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 ProductTailoringSetSlugActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetSlugActionBuilder builder) { + ProductTailoringSetSlugAction productTailoringSetSlugAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetSlugAction).isInstanceOf(ProductTailoringSetSlugAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringSetSlugAction.builder() + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringSetSlugAction.builder().staged(true) } }; + } + + @Test + public void slug() { + ProductTailoringSetSlugAction value = ProductTailoringSetSlugAction.of(); + value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void staged() { + ProductTailoringSetSlugAction value = ProductTailoringSetSlugAction.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/ProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringTest.java new file mode 100644 index 00000000000..00018ed48d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringTest.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.models.product_tailoring; + +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 ProductTailoringTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringBuilder builder) { + ProductTailoring productTailoring = builder.buildUnchecked(); + Assertions.assertThat(productTailoring).isInstanceOf(ProductTailoring.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoring.builder().id("id") }, + new Object[] { ProductTailoring.builder().version(2L) }, + new Object[] { ProductTailoring.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { ProductTailoring.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { ProductTailoring.builder() + .lastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()) }, + new Object[] { + ProductTailoring.builder().createdBy(new com.commercetools.api.models.common.CreatedByImpl()) }, + new Object[] { ProductTailoring.builder().key("key") }, + new Object[] { ProductTailoring.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoring.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoring.builder().published(true) }, + new Object[] { ProductTailoring.builder() + .current(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()) }, + new Object[] { ProductTailoring.builder() + .staged(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()) }, + new Object[] { ProductTailoring.builder().hasStagedChanges(true) } }; + } + + @Test + public void id() { + ProductTailoring value = ProductTailoring.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + ProductTailoring value = ProductTailoring.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void createdAt() { + ProductTailoring value = ProductTailoring.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { + ProductTailoring value = ProductTailoring.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + ProductTailoring value = ProductTailoring.of(); + value.setLastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()); + Assertions.assertThat(value.getLastModifiedBy()) + .isEqualTo(new com.commercetools.api.models.common.LastModifiedByImpl()); + } + + @Test + public void createdBy() { + ProductTailoring value = ProductTailoring.of(); + value.setCreatedBy(new com.commercetools.api.models.common.CreatedByImpl()); + Assertions.assertThat(value.getCreatedBy()).isEqualTo(new com.commercetools.api.models.common.CreatedByImpl()); + } + + @Test + public void key() { + ProductTailoring value = ProductTailoring.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void store() { + ProductTailoring value = ProductTailoring.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 product() { + ProductTailoring value = ProductTailoring.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 published() { + ProductTailoring value = ProductTailoring.of(); + value.setPublished(true); + Assertions.assertThat(value.getPublished()).isEqualTo(true); + } + + @Test + public void current() { + ProductTailoring value = ProductTailoring.of(); + value.setCurrent(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()); + Assertions.assertThat(value.getCurrent()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()); + } + + @Test + public void staged() { + ProductTailoring value = ProductTailoring.of(); + value.setStaged(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()); + Assertions.assertThat(value.getStaged()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductTailoringDataImpl()); + } + + @Test + public void hasStagedChanges() { + ProductTailoring value = ProductTailoring.of(); + value.setHasStagedChanges(true); + Assertions.assertThat(value.getHasStagedChanges()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionTest.java new file mode 100644 index 00000000000..f0e5224521b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUnpublishActionTest.java @@ -0,0 +1,13 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringUnpublishActionTest { + +} diff --git a/references.txt b/references.txt index 5743a0b6190..cc5d1e77e61 100644 --- a/references.txt +++ b/references.txt @@ -204,3 +204,4 @@ ffed231e91d01608e1bb08ecc1883cf00d9d9293 48bbac8851ae864319c404607e9f10b874df0e3f 15f9e1d4f4595a72184d80cfb317402e5676eac9 9dcfaf574c603be5533209cf591ed3c0c5f9b821 +9426f11f6f1755829c81c7db9fce597fdda6ade6