diff --git a/changes.md b/changes.md index fcc5b4bb7e5..5c0bf32a813 100644 --- a/changes.md +++ b/changes.md @@ -3,64 +3,65 @@
Added Type(s) -- added type `InventoryEntrySetInventoryLimitsAction` -- added type `RecurringOrderDeletedMessage` -- added type `RecurringOrderExpiresAtSetMessage` -- added type `RecurringOrderDeletedMessagePayload` -- added type `RecurringOrderExpiresAtSetMessagePayload` -- added type `ProductSearchFacetResultStats` -- added type `ProductSearchFacetStatsExpression` -- added type `ProductSearchFacetStatsValue` -- added type `RecurringOrderSetExpiresAtAction` -
- - -
-Removed Type(s) - -- :warning: removed type `RecurringOrderMessagePayload` +- added type `CustomerDefaultBillingAddressSetMessage` +- added type `CustomerDefaultShippingAddressSetMessage` +- added type `CustomerStoresSetMessage` +- added type `CustomerDefaultBillingAddressSetMessagePayload` +- added type `CustomerDefaultShippingAddressSetMessagePayload` +- added type `CustomerStoresSetMessagePayload`
Added Method(s) -- added method `apiRoot.withProjectKey().recurringOrders().withId().delete()` -- added method `apiRoot.withProjectKey().recurringOrders().withKey().delete()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().delete()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withId().delete()`
+**Import changes**
-Added Property(s) +Added Type(s) -- added property `minCartQuantity` to type `InventoryEntry` -- added property `maxCartQuantity` to type `InventoryEntry` -- added property `minCartQuantity` to type `InventoryEntryDraft` -- added property `maxCartQuantity` to type `InventoryEntryDraft` -- added property `expiresAt` to type `RecurringOrderDraft` +- added type `AssociateRoleKeyReference` +- added type `BusinessUnitKeyReference` +- added type `BusinessUnitImportRequest` +- added type `AssociateRoleInheritanceMode` +- added type `BusinessUnitStatus` +- added type `BusinessUnitAssociateMode` +- added type `BusinessUnitApprovalRuleMode` +- added type `BusinessUnitStoreMode` +- added type `BusinessUnitType` +- added type `AssociateRoleAssignmentDraft` +- added type `AssociateDraft` +- added type `BusinessUnitImport` +- added type `CompanyBusinessUnitImport` +- added type `DivisionBusinessUnitImport`
-Added Enum(s) +Added Method(s) -- added enum `discount-group` to type `ChangeSubscriptionResourceTypeId` +- added method `apiRoot.withProjectKeyValue().businessUnits().importContainers().withImportContainerKeyValue().post()`
-**History changes**
-Added Type(s) +Added Resource(s) -- added type `TooManyRequestsError` -- added type `GraphQLTooManyRequestsError` -- added type `GraphQLErrorObject` +- added resource `/{projectKey}/business-units` +- added resource `/{projectKey}/business-units/import-containers` +- added resource `/{projectKey}/business-units/import-containers/{importContainerKey}`
-Changed Property(s) +Added Enum(s) -- :warning: changed property `extensions` of type `GraphQLError` from type `object` to `GraphQLErrorObject` +- added enum `business-unit` to type `ImportResourceType` +- added enum `associate-role` to type `ReferenceType` +- added enum `business-unit` to type `ReferenceType`
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 dc5b613a9ed..9e60da4e35e 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -3749,6 +3749,16 @@ type CustomerDateOfBirthSet implements MessagePayload { type: String! } +type CustomerDefaultBillingAddressSet implements MessagePayload { + address: Address + type: String! +} + +type CustomerDefaultShippingAddressSet implements MessagePayload { + address: Address + type: String! +} + type CustomerDeleted implements MessagePayload { type: String! } @@ -4067,6 +4077,14 @@ input CustomerSignUpDraft { authenticationMode: AuthenticationMode } +type CustomerStoresSet implements MessagePayload { + stores: [Store!]! + oldStores: [Store!]! + storesRef: [KeyReference!]! + oldStoresRef: [KeyReference!]! + type: String! +} + type CustomerTitleSet implements MessagePayload { title: String type: String! @@ -6909,6 +6927,15 @@ type Mutation { "Queries with specified key" key: String): RecurrencePolicy + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteRecurrencePolicy(version: Long!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): RecurrencePolicy + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" createPaymentMethod(draft: PaymentMethodDraft!): PaymentMethod diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDDelete.java new file mode 100644 index 00000000000..e3929c72dc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDDelete.java @@ -0,0 +1,296 @@ + +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; + +/** + *

Deletes a Recurrence Policy in the Project.

+ *

A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a ReferenceExists error is returned.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .recurrencePolicies()
+ *            .withId("{ID}")
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurrencePoliciesByIDDelete(ByProjectKeyRecurrencePoliciesByIDDelete 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/recurrence-policies/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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 ByProjectKeyRecurrencePoliciesByIDDelete + */ + public ByProjectKeyRecurrencePoliciesByIDDelete 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; + + ByProjectKeyRecurrencePoliciesByIDDelete that = (ByProjectKeyRecurrencePoliciesByIDDelete) 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 ByProjectKeyRecurrencePoliciesByIDDelete copy() { + return new ByProjectKeyRecurrencePoliciesByIDDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java index 610400db8dd..cc87036c9ee 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java @@ -43,4 +43,12 @@ public ByProjectKeyRecurrencePoliciesByIDPost post( op.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateBuilder.of()).build()); } + public ByProjectKeyRecurrencePoliciesByIDDelete delete() { + return new ByProjectKeyRecurrencePoliciesByIDDelete(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurrencePoliciesByIDDelete delete(TValue version) { + return delete().withVersion(version); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.java new file mode 100644 index 00000000000..36978e49a18 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyDelete.java @@ -0,0 +1,297 @@ + +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; + +/** + *

Deletes a Recurrence Policy in the Project.

+ *

A Recurrence Policy can be deleted only if it is not referenced by any Embedded Price, Standalone Price, or (Custom) Line Item, otherwise a ReferenceExists error is returned.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .recurrencePolicies()
+ *            .withKey("{key}")
+ *            .delete()
+ *            .withVersion(version)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete(ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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/recurrence-policies/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete 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; + + ByProjectKeyRecurrencePoliciesKeyByKeyDelete that = (ByProjectKeyRecurrencePoliciesKeyByKeyDelete) 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 ByProjectKeyRecurrencePoliciesKeyByKeyDelete copy() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java index b20e69596b2..fc919025715 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java @@ -44,4 +44,12 @@ public ByProjectKeyRecurrencePoliciesKeyByKeyPost post( op.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateBuilder.of()).build()); } + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete delete() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyDelete(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyDelete delete(TValue version) { + return delete().withVersion(version); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressAction.java index 0c9a6183354..b4c499f056c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressAction.java @@ -14,6 +14,7 @@ /** *

Sets the default billing address from addresses. The action adds the id of the specified Address to the billingAddressIds if not contained already. Either addressId or addressKey is required.

+ *

This action generates the CustomerDefaultBillingAddressSet Message.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressActionImpl.java index d8a72598088..27ce489ba41 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultBillingAddressActionImpl.java @@ -18,6 +18,7 @@ /** *

Sets the default billing address from addresses. The action adds the id of the specified Address to the billingAddressIds if not contained already. Either addressId or addressKey is required.

+ *

This action generates the CustomerDefaultBillingAddressSet Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomerSetDefaultBillingAddressActionImpl implements CustomerSetDefaultBillingAddressAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressAction.java index 22e09c651c1..6d0b8657542 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressAction.java @@ -14,6 +14,7 @@ /** *

Sets the default shipping address from addresses. The action adds the id of the specified address to the shippingAddressIds if not contained already. Either addressId or addressKey is required.

+ *

This action generates the CustomerDefaultShippingAddressSet Message.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressActionImpl.java index 9f4a3d72ecc..a512393b78c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetDefaultShippingAddressActionImpl.java @@ -18,6 +18,7 @@ /** *

Sets the default shipping address from addresses. The action adds the id of the specified address to the shippingAddressIds if not contained already. Either addressId or addressKey is required.

+ *

This action generates the CustomerDefaultShippingAddressSet Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomerSetDefaultShippingAddressActionImpl implements CustomerSetDefaultShippingAddressAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresAction.java index 64dad5ce413..c917aa721f2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresAction.java @@ -19,6 +19,7 @@ /** *

Sets the Stores the Customer account is associated with. If no Stores are specified, the Customer becomes a global Customer.

+ *

This action generates the CustomerStoresSet Message.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresActionImpl.java index d27ee7a18bc..38a12b6fd9f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerSetStoresActionImpl.java @@ -18,6 +18,7 @@ /** *

Sets the Stores the Customer account is associated with. If no Stores are specified, the Customer becomes a global Customer.

+ *

This action generates the CustomerStoresSet Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomerSetStoresActionImpl implements CustomerSetStoresAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessage.java new file mode 100644 index 00000000000..eb19b2f34e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessage.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Address; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Generated after a successful Set Default Billing Address update action.

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

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

The address that was set as the default billing address.

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

The address that was set as the default billing address.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + * factory method + * @return instance of CustomerDefaultBillingAddressSetMessage + */ + public static CustomerDefaultBillingAddressSetMessage of() { + return new CustomerDefaultBillingAddressSetMessageImpl(); + } + + /** + * factory method to create a shallow copy CustomerDefaultBillingAddressSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static CustomerDefaultBillingAddressSetMessage of(final CustomerDefaultBillingAddressSetMessage template) { + CustomerDefaultBillingAddressSetMessageImpl instance = new CustomerDefaultBillingAddressSetMessageImpl(); + 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.setAddress(template.getAddress()); + return instance; + } + + public CustomerDefaultBillingAddressSetMessage copyDeep(); + + /** + * factory method to create a deep copy of CustomerDefaultBillingAddressSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerDefaultBillingAddressSetMessage deepCopy( + @Nullable final CustomerDefaultBillingAddressSetMessage template) { + if (template == null) { + return null; + } + CustomerDefaultBillingAddressSetMessageImpl instance = new CustomerDefaultBillingAddressSetMessageImpl(); + 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.setAddress(com.commercetools.api.models.common.Address.deepCopy(template.getAddress())); + return instance; + } + + /** + * builder factory method for CustomerDefaultBillingAddressSetMessage + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessageBuilder builder() { + return CustomerDefaultBillingAddressSetMessageBuilder.of(); + } + + /** + * create builder for CustomerDefaultBillingAddressSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessageBuilder builder( + final CustomerDefaultBillingAddressSetMessage template) { + return CustomerDefaultBillingAddressSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerDefaultBillingAddressSetMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerDefaultBillingAddressSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageBuilder.java new file mode 100644 index 00000000000..539bf1c0c53 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageBuilder.java @@ -0,0 +1,458 @@ + +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; + +/** + * CustomerDefaultBillingAddressSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerDefaultBillingAddressSetMessage customerDefaultBillingAddressSetMessage = CustomerDefaultBillingAddressSetMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultBillingAddressSetMessageBuilder + 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 com.commercetools.api.models.common.Address address; + + /** + *

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

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

The address that was set as the default billing address.

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

The address that was set as the default billing address.

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

The address that was set as the default billing address.

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

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The address that was set as the default billing address.

+ * @return address + */ + + @Nullable + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + /** + * builds CustomerDefaultBillingAddressSetMessage with checking for non-null required values + * @return CustomerDefaultBillingAddressSetMessage + */ + public CustomerDefaultBillingAddressSetMessage build() { + Objects.requireNonNull(id, CustomerDefaultBillingAddressSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, CustomerDefaultBillingAddressSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CustomerDefaultBillingAddressSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + CustomerDefaultBillingAddressSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + CustomerDefaultBillingAddressSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CustomerDefaultBillingAddressSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + CustomerDefaultBillingAddressSetMessage.class + ": resourceVersion is missing"); + return new CustomerDefaultBillingAddressSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, address); + } + + /** + * builds CustomerDefaultBillingAddressSetMessage without checking for non-null required values + * @return CustomerDefaultBillingAddressSetMessage + */ + public CustomerDefaultBillingAddressSetMessage buildUnchecked() { + return new CustomerDefaultBillingAddressSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, address); + } + + /** + * factory method for an instance of CustomerDefaultBillingAddressSetMessageBuilder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessageBuilder of() { + return new CustomerDefaultBillingAddressSetMessageBuilder(); + } + + /** + * create builder for CustomerDefaultBillingAddressSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessageBuilder of( + final CustomerDefaultBillingAddressSetMessage template) { + CustomerDefaultBillingAddressSetMessageBuilder builder = new CustomerDefaultBillingAddressSetMessageBuilder(); + 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.address = template.getAddress(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageImpl.java new file mode 100644 index 00000000000..d73dd11f5d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageImpl.java @@ -0,0 +1,301 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Set Default Billing Address update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultBillingAddressSetMessageImpl implements CustomerDefaultBillingAddressSetMessage, 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.common.Address address; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerDefaultBillingAddressSetMessageImpl(@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("address") final com.commercetools.api.models.common.Address address) { + 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.address = address; + this.type = CUSTOMER_DEFAULT_BILLING_ADDRESS_SET; + } + + /** + * create empty instance + */ + public CustomerDefaultBillingAddressSetMessageImpl() { + this.type = CUSTOMER_DEFAULT_BILLING_ADDRESS_SET; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The address that was set as the default billing address.

+ */ + + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + 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 setAddress(final com.commercetools.api.models.common.Address address) { + this.address = address; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerDefaultBillingAddressSetMessageImpl that = (CustomerDefaultBillingAddressSetMessageImpl) 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(address, that.address) + .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(address, that.address) + .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(address) + .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("address", address) + .build(); + } + + @Override + public CustomerDefaultBillingAddressSetMessage copyDeep() { + return CustomerDefaultBillingAddressSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayload.java new file mode 100644 index 00000000000..3886799a79a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayload.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Address; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Generated after a successful Set Default Billing Address update action.

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

+ *     CustomerDefaultBillingAddressSetMessagePayload customerDefaultBillingAddressSetMessagePayload = CustomerDefaultBillingAddressSetMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CustomerDefaultBillingAddressSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerDefaultBillingAddressSetMessagePayloadImpl.class) +public interface CustomerDefaultBillingAddressSetMessagePayload extends MessagePayload { + + /** + * discriminator value for CustomerDefaultBillingAddressSetMessagePayload + */ + String CUSTOMER_DEFAULT_BILLING_ADDRESS_SET = "CustomerDefaultBillingAddressSet"; + + /** + *

The address that was set as the default billing address.

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

The address that was set as the default billing address.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + * factory method + * @return instance of CustomerDefaultBillingAddressSetMessagePayload + */ + public static CustomerDefaultBillingAddressSetMessagePayload of() { + return new CustomerDefaultBillingAddressSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CustomerDefaultBillingAddressSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CustomerDefaultBillingAddressSetMessagePayload of( + final CustomerDefaultBillingAddressSetMessagePayload template) { + CustomerDefaultBillingAddressSetMessagePayloadImpl instance = new CustomerDefaultBillingAddressSetMessagePayloadImpl(); + instance.setAddress(template.getAddress()); + return instance; + } + + public CustomerDefaultBillingAddressSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of CustomerDefaultBillingAddressSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerDefaultBillingAddressSetMessagePayload deepCopy( + @Nullable final CustomerDefaultBillingAddressSetMessagePayload template) { + if (template == null) { + return null; + } + CustomerDefaultBillingAddressSetMessagePayloadImpl instance = new CustomerDefaultBillingAddressSetMessagePayloadImpl(); + instance.setAddress(com.commercetools.api.models.common.Address.deepCopy(template.getAddress())); + return instance; + } + + /** + * builder factory method for CustomerDefaultBillingAddressSetMessagePayload + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessagePayloadBuilder builder() { + return CustomerDefaultBillingAddressSetMessagePayloadBuilder.of(); + } + + /** + * create builder for CustomerDefaultBillingAddressSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessagePayloadBuilder builder( + final CustomerDefaultBillingAddressSetMessagePayload template) { + return CustomerDefaultBillingAddressSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerDefaultBillingAddressSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerDefaultBillingAddressSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..84a8352c23d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadBuilder.java @@ -0,0 +1,112 @@ + +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; + +/** + * CustomerDefaultBillingAddressSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerDefaultBillingAddressSetMessagePayload customerDefaultBillingAddressSetMessagePayload = CustomerDefaultBillingAddressSetMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultBillingAddressSetMessagePayloadBuilder + implements Builder { + + @Nullable + private com.commercetools.api.models.common.Address address; + + /** + *

The address that was set as the default billing address.

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

The address that was set as the default billing address.

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

The address that was set as the default billing address.

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

The address that was set as the default billing address.

+ * @return address + */ + + @Nullable + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + /** + * builds CustomerDefaultBillingAddressSetMessagePayload with checking for non-null required values + * @return CustomerDefaultBillingAddressSetMessagePayload + */ + public CustomerDefaultBillingAddressSetMessagePayload build() { + return new CustomerDefaultBillingAddressSetMessagePayloadImpl(address); + } + + /** + * builds CustomerDefaultBillingAddressSetMessagePayload without checking for non-null required values + * @return CustomerDefaultBillingAddressSetMessagePayload + */ + public CustomerDefaultBillingAddressSetMessagePayload buildUnchecked() { + return new CustomerDefaultBillingAddressSetMessagePayloadImpl(address); + } + + /** + * factory method for an instance of CustomerDefaultBillingAddressSetMessagePayloadBuilder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessagePayloadBuilder of() { + return new CustomerDefaultBillingAddressSetMessagePayloadBuilder(); + } + + /** + * create builder for CustomerDefaultBillingAddressSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultBillingAddressSetMessagePayloadBuilder of( + final CustomerDefaultBillingAddressSetMessagePayload template) { + CustomerDefaultBillingAddressSetMessagePayloadBuilder builder = new CustomerDefaultBillingAddressSetMessagePayloadBuilder(); + builder.address = template.getAddress(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadImpl.java new file mode 100644 index 00000000000..802e34a9c33 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Set Default Billing Address update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultBillingAddressSetMessagePayloadImpl + implements CustomerDefaultBillingAddressSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.common.Address address; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerDefaultBillingAddressSetMessagePayloadImpl( + @JsonProperty("address") final com.commercetools.api.models.common.Address address) { + this.address = address; + this.type = CUSTOMER_DEFAULT_BILLING_ADDRESS_SET; + } + + /** + * create empty instance + */ + public CustomerDefaultBillingAddressSetMessagePayloadImpl() { + this.type = CUSTOMER_DEFAULT_BILLING_ADDRESS_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The address that was set as the default billing address.

+ */ + + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + public void setAddress(final com.commercetools.api.models.common.Address address) { + this.address = address; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerDefaultBillingAddressSetMessagePayloadImpl that = (CustomerDefaultBillingAddressSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(address, that.address) + .append(type, that.type) + .append(address, that.address) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(address).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("address", address) + .build(); + } + + @Override + public CustomerDefaultBillingAddressSetMessagePayload copyDeep() { + return CustomerDefaultBillingAddressSetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessage.java new file mode 100644 index 00000000000..f427833a396 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessage.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Address; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Generated after a successful Set Default Shipping Address update action.

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

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

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + * factory method + * @return instance of CustomerDefaultShippingAddressSetMessage + */ + public static CustomerDefaultShippingAddressSetMessage of() { + return new CustomerDefaultShippingAddressSetMessageImpl(); + } + + /** + * factory method to create a shallow copy CustomerDefaultShippingAddressSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static CustomerDefaultShippingAddressSetMessage of(final CustomerDefaultShippingAddressSetMessage template) { + CustomerDefaultShippingAddressSetMessageImpl instance = new CustomerDefaultShippingAddressSetMessageImpl(); + 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.setAddress(template.getAddress()); + return instance; + } + + public CustomerDefaultShippingAddressSetMessage copyDeep(); + + /** + * factory method to create a deep copy of CustomerDefaultShippingAddressSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerDefaultShippingAddressSetMessage deepCopy( + @Nullable final CustomerDefaultShippingAddressSetMessage template) { + if (template == null) { + return null; + } + CustomerDefaultShippingAddressSetMessageImpl instance = new CustomerDefaultShippingAddressSetMessageImpl(); + 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.setAddress(com.commercetools.api.models.common.Address.deepCopy(template.getAddress())); + return instance; + } + + /** + * builder factory method for CustomerDefaultShippingAddressSetMessage + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessageBuilder builder() { + return CustomerDefaultShippingAddressSetMessageBuilder.of(); + } + + /** + * create builder for CustomerDefaultShippingAddressSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessageBuilder builder( + final CustomerDefaultShippingAddressSetMessage template) { + return CustomerDefaultShippingAddressSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerDefaultShippingAddressSetMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerDefaultShippingAddressSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageBuilder.java new file mode 100644 index 00000000000..baaab19e822 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageBuilder.java @@ -0,0 +1,459 @@ + +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; + +/** + * CustomerDefaultShippingAddressSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerDefaultShippingAddressSetMessage customerDefaultShippingAddressSetMessage = CustomerDefaultShippingAddressSetMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultShippingAddressSetMessageBuilder + 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 com.commercetools.api.models.common.Address address; + + /** + *

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

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

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

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The address that was set as the default shipping address.

+ * @return address + */ + + @Nullable + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + /** + * builds CustomerDefaultShippingAddressSetMessage with checking for non-null required values + * @return CustomerDefaultShippingAddressSetMessage + */ + public CustomerDefaultShippingAddressSetMessage build() { + Objects.requireNonNull(id, CustomerDefaultShippingAddressSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, CustomerDefaultShippingAddressSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CustomerDefaultShippingAddressSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + CustomerDefaultShippingAddressSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + CustomerDefaultShippingAddressSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CustomerDefaultShippingAddressSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + CustomerDefaultShippingAddressSetMessage.class + ": resourceVersion is missing"); + return new CustomerDefaultShippingAddressSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, address); + } + + /** + * builds CustomerDefaultShippingAddressSetMessage without checking for non-null required values + * @return CustomerDefaultShippingAddressSetMessage + */ + public CustomerDefaultShippingAddressSetMessage buildUnchecked() { + return new CustomerDefaultShippingAddressSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, address); + } + + /** + * factory method for an instance of CustomerDefaultShippingAddressSetMessageBuilder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessageBuilder of() { + return new CustomerDefaultShippingAddressSetMessageBuilder(); + } + + /** + * create builder for CustomerDefaultShippingAddressSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessageBuilder of( + final CustomerDefaultShippingAddressSetMessage template) { + CustomerDefaultShippingAddressSetMessageBuilder builder = new CustomerDefaultShippingAddressSetMessageBuilder(); + 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.address = template.getAddress(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageImpl.java new file mode 100644 index 00000000000..01dbe2f0003 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageImpl.java @@ -0,0 +1,302 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Set Default Shipping Address update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultShippingAddressSetMessageImpl + implements CustomerDefaultShippingAddressSetMessage, 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.common.Address address; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerDefaultShippingAddressSetMessageImpl(@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("address") final com.commercetools.api.models.common.Address address) { + 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.address = address; + this.type = CUSTOMER_DEFAULT_SHIPPING_ADDRESS_SET; + } + + /** + * create empty instance + */ + public CustomerDefaultShippingAddressSetMessageImpl() { + this.type = CUSTOMER_DEFAULT_SHIPPING_ADDRESS_SET; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The address that was set as the default shipping address.

+ */ + + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + 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 setAddress(final com.commercetools.api.models.common.Address address) { + this.address = address; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerDefaultShippingAddressSetMessageImpl that = (CustomerDefaultShippingAddressSetMessageImpl) 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(address, that.address) + .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(address, that.address) + .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(address) + .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("address", address) + .build(); + } + + @Override + public CustomerDefaultShippingAddressSetMessage copyDeep() { + return CustomerDefaultShippingAddressSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayload.java new file mode 100644 index 00000000000..63a6e3b72ba --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayload.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Address; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Generated after a successful Set Default Shipping Address update action.

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

+ *     CustomerDefaultShippingAddressSetMessagePayload customerDefaultShippingAddressSetMessagePayload = CustomerDefaultShippingAddressSetMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CustomerDefaultShippingAddressSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerDefaultShippingAddressSetMessagePayloadImpl.class) +public interface CustomerDefaultShippingAddressSetMessagePayload extends MessagePayload { + + /** + * discriminator value for CustomerDefaultShippingAddressSetMessagePayload + */ + String CUSTOMER_DEFAULT_SHIPPING_ADDRESS_SET = "CustomerDefaultShippingAddressSet"; + + /** + *

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

+ * @param address value to be set + */ + + public void setAddress(final Address address); + + /** + * factory method + * @return instance of CustomerDefaultShippingAddressSetMessagePayload + */ + public static CustomerDefaultShippingAddressSetMessagePayload of() { + return new CustomerDefaultShippingAddressSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CustomerDefaultShippingAddressSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CustomerDefaultShippingAddressSetMessagePayload of( + final CustomerDefaultShippingAddressSetMessagePayload template) { + CustomerDefaultShippingAddressSetMessagePayloadImpl instance = new CustomerDefaultShippingAddressSetMessagePayloadImpl(); + instance.setAddress(template.getAddress()); + return instance; + } + + public CustomerDefaultShippingAddressSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of CustomerDefaultShippingAddressSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerDefaultShippingAddressSetMessagePayload deepCopy( + @Nullable final CustomerDefaultShippingAddressSetMessagePayload template) { + if (template == null) { + return null; + } + CustomerDefaultShippingAddressSetMessagePayloadImpl instance = new CustomerDefaultShippingAddressSetMessagePayloadImpl(); + instance.setAddress(com.commercetools.api.models.common.Address.deepCopy(template.getAddress())); + return instance; + } + + /** + * builder factory method for CustomerDefaultShippingAddressSetMessagePayload + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessagePayloadBuilder builder() { + return CustomerDefaultShippingAddressSetMessagePayloadBuilder.of(); + } + + /** + * create builder for CustomerDefaultShippingAddressSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessagePayloadBuilder builder( + final CustomerDefaultShippingAddressSetMessagePayload template) { + return CustomerDefaultShippingAddressSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerDefaultShippingAddressSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerDefaultShippingAddressSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..66916248d8f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadBuilder.java @@ -0,0 +1,112 @@ + +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; + +/** + * CustomerDefaultShippingAddressSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerDefaultShippingAddressSetMessagePayload customerDefaultShippingAddressSetMessagePayload = CustomerDefaultShippingAddressSetMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultShippingAddressSetMessagePayloadBuilder + implements Builder { + + @Nullable + private com.commercetools.api.models.common.Address address; + + /** + *

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

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

The address that was set as the default shipping address.

+ * @return address + */ + + @Nullable + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + /** + * builds CustomerDefaultShippingAddressSetMessagePayload with checking for non-null required values + * @return CustomerDefaultShippingAddressSetMessagePayload + */ + public CustomerDefaultShippingAddressSetMessagePayload build() { + return new CustomerDefaultShippingAddressSetMessagePayloadImpl(address); + } + + /** + * builds CustomerDefaultShippingAddressSetMessagePayload without checking for non-null required values + * @return CustomerDefaultShippingAddressSetMessagePayload + */ + public CustomerDefaultShippingAddressSetMessagePayload buildUnchecked() { + return new CustomerDefaultShippingAddressSetMessagePayloadImpl(address); + } + + /** + * factory method for an instance of CustomerDefaultShippingAddressSetMessagePayloadBuilder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessagePayloadBuilder of() { + return new CustomerDefaultShippingAddressSetMessagePayloadBuilder(); + } + + /** + * create builder for CustomerDefaultShippingAddressSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerDefaultShippingAddressSetMessagePayloadBuilder of( + final CustomerDefaultShippingAddressSetMessagePayload template) { + CustomerDefaultShippingAddressSetMessagePayloadBuilder builder = new CustomerDefaultShippingAddressSetMessagePayloadBuilder(); + builder.address = template.getAddress(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadImpl.java new file mode 100644 index 00000000000..28d19accc84 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Set Default Shipping Address update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerDefaultShippingAddressSetMessagePayloadImpl + implements CustomerDefaultShippingAddressSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.common.Address address; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerDefaultShippingAddressSetMessagePayloadImpl( + @JsonProperty("address") final com.commercetools.api.models.common.Address address) { + this.address = address; + this.type = CUSTOMER_DEFAULT_SHIPPING_ADDRESS_SET; + } + + /** + * create empty instance + */ + public CustomerDefaultShippingAddressSetMessagePayloadImpl() { + this.type = CUSTOMER_DEFAULT_SHIPPING_ADDRESS_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The address that was set as the default shipping address.

+ */ + + public com.commercetools.api.models.common.Address getAddress() { + return this.address; + } + + public void setAddress(final com.commercetools.api.models.common.Address address) { + this.address = address; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerDefaultShippingAddressSetMessagePayloadImpl that = (CustomerDefaultShippingAddressSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(address, that.address) + .append(type, that.type) + .append(address, that.address) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(address).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("address", address) + .build(); + } + + @Override + public CustomerDefaultShippingAddressSetMessagePayload copyDeep() { + return CustomerDefaultShippingAddressSetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessage.java new file mode 100644 index 00000000000..ab80ea99712 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessage.java @@ -0,0 +1,206 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Stores update action.

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

+ *     CustomerStoresSetMessage customerStoresSetMessage = CustomerStoresSetMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .plusStores(storesBuilder -> storesBuilder)
+ *             .plusOldStores(oldStoresBuilder -> oldStoresBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CustomerStoresSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerStoresSetMessageImpl.class) +public interface CustomerStoresSetMessage extends Message { + + /** + * discriminator value for CustomerStoresSetMessage + */ + String CUSTOMER_STORES_SET = "CustomerStoresSet"; + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @return stores + */ + @NotNull + @Valid + @JsonProperty("stores") + public List getStores(); + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @return oldStores + */ + @NotNull + @Valid + @JsonProperty("oldStores") + public List getOldStores(); + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores values to be set + */ + + @JsonIgnore + public void setOldStores(final StoreKeyReference... oldStores); + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores values to be set + */ + + public void setOldStores(final List oldStores); + + /** + * factory method + * @return instance of CustomerStoresSetMessage + */ + public static CustomerStoresSetMessage of() { + return new CustomerStoresSetMessageImpl(); + } + + /** + * factory method to create a shallow copy CustomerStoresSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static CustomerStoresSetMessage of(final CustomerStoresSetMessage template) { + CustomerStoresSetMessageImpl instance = new CustomerStoresSetMessageImpl(); + 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.setStores(template.getStores()); + instance.setOldStores(template.getOldStores()); + return instance; + } + + public CustomerStoresSetMessage copyDeep(); + + /** + * factory method to create a deep copy of CustomerStoresSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerStoresSetMessage deepCopy(@Nullable final CustomerStoresSetMessage template) { + if (template == null) { + return null; + } + CustomerStoresSetMessageImpl instance = new CustomerStoresSetMessageImpl(); + 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.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setOldStores(Optional.ofNullable(template.getOldStores()) + .map(t -> t.stream() + .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for CustomerStoresSetMessage + * @return builder + */ + public static CustomerStoresSetMessageBuilder builder() { + return CustomerStoresSetMessageBuilder.of(); + } + + /** + * create builder for CustomerStoresSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerStoresSetMessageBuilder builder(final CustomerStoresSetMessage template) { + return CustomerStoresSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerStoresSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerStoresSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageBuilder.java new file mode 100644 index 00000000000..67128ed260b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageBuilder.java @@ -0,0 +1,608 @@ + +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; + +/** + * CustomerStoresSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerStoresSetMessage customerStoresSetMessage = CustomerStoresSetMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .plusStores(storesBuilder -> storesBuilder)
+ *             .plusOldStores(oldStoresBuilder -> oldStoresBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerStoresSetMessageBuilder 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 java.util.List stores; + + private java.util.List oldStores; + + /** + *

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

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores value to be set + * @return Builder + */ + + public CustomerStoresSetMessageBuilder stores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores value to be set + * @return Builder + */ + + public CustomerStoresSetMessageBuilder plusStores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CustomerStoresSetMessageBuilder plusStores( + Function builder) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CustomerStoresSetMessageBuilder withStores( + Function builder) { + this.stores = new ArrayList<>(); + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores value to be set + * @return Builder + */ + + public CustomerStoresSetMessageBuilder oldStores( + final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + this.oldStores = new ArrayList<>(Arrays.asList(oldStores)); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores value to be set + * @return Builder + */ + + public CustomerStoresSetMessageBuilder plusOldStores( + final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + if (this.oldStores == null) { + this.oldStores = new ArrayList<>(); + } + this.oldStores.addAll(Arrays.asList(oldStores)); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param builder function to build the oldStores value + * @return Builder + */ + + public CustomerStoresSetMessageBuilder plusOldStores( + Function builder) { + if (this.oldStores == null) { + this.oldStores = new ArrayList<>(); + } + this.oldStores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param builder function to build the oldStores value + * @return Builder + */ + + public CustomerStoresSetMessageBuilder withOldStores( + Function builder) { + this.oldStores = new ArrayList<>(); + this.oldStores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

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

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The Stores the Customer is associated with after the Set Stores update action.

+ * @return stores + */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @return oldStores + */ + + public java.util.List getOldStores() { + return this.oldStores; + } + + /** + * builds CustomerStoresSetMessage with checking for non-null required values + * @return CustomerStoresSetMessage + */ + public CustomerStoresSetMessage build() { + Objects.requireNonNull(id, CustomerStoresSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, CustomerStoresSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CustomerStoresSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CustomerStoresSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CustomerStoresSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CustomerStoresSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CustomerStoresSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(stores, CustomerStoresSetMessage.class + ": stores is missing"); + Objects.requireNonNull(oldStores, CustomerStoresSetMessage.class + ": oldStores is missing"); + return new CustomerStoresSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, stores, oldStores); + } + + /** + * builds CustomerStoresSetMessage without checking for non-null required values + * @return CustomerStoresSetMessage + */ + public CustomerStoresSetMessage buildUnchecked() { + return new CustomerStoresSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, stores, oldStores); + } + + /** + * factory method for an instance of CustomerStoresSetMessageBuilder + * @return builder + */ + public static CustomerStoresSetMessageBuilder of() { + return new CustomerStoresSetMessageBuilder(); + } + + /** + * create builder for CustomerStoresSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerStoresSetMessageBuilder of(final CustomerStoresSetMessage template) { + CustomerStoresSetMessageBuilder builder = new CustomerStoresSetMessageBuilder(); + 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.stores = template.getStores(); + builder.oldStores = template.getOldStores(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageImpl.java new file mode 100644 index 00000000000..25816fb5d83 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageImpl.java @@ -0,0 +1,328 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Set Stores update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerStoresSetMessageImpl implements CustomerStoresSetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private java.util.List stores; + + private java.util.List oldStores; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerStoresSetMessageImpl(@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("stores") final java.util.List stores, + @JsonProperty("oldStores") final java.util.List oldStores) { + 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.stores = stores; + this.oldStores = oldStores; + this.type = CUSTOMER_STORES_SET; + } + + /** + * create empty instance + */ + public CustomerStoresSetMessageImpl() { + this.type = CUSTOMER_STORES_SET; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The Stores the Customer is associated with after the Set Stores update action.

+ */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ */ + + public java.util.List getOldStores() { + return this.oldStores; + } + + 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 setStores(final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + + public void setOldStores(final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + this.oldStores = new ArrayList<>(Arrays.asList(oldStores)); + } + + public void setOldStores(final java.util.List oldStores) { + this.oldStores = oldStores; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerStoresSetMessageImpl that = (CustomerStoresSetMessageImpl) 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(stores, that.stores) + .append(oldStores, that.oldStores) + .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(stores, that.stores) + .append(oldStores, that.oldStores) + .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(stores) + .append(oldStores) + .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("stores", stores) + .append("oldStores", oldStores) + .build(); + } + + @Override + public CustomerStoresSetMessage copyDeep() { + return CustomerStoresSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayload.java new file mode 100644 index 00000000000..b486158c687 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayload.java @@ -0,0 +1,177 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Stores update action.

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

+ *     CustomerStoresSetMessagePayload customerStoresSetMessagePayload = CustomerStoresSetMessagePayload.builder()
+ *             .plusStores(storesBuilder -> storesBuilder)
+ *             .plusOldStores(oldStoresBuilder -> oldStoresBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CustomerStoresSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerStoresSetMessagePayloadImpl.class) +public interface CustomerStoresSetMessagePayload extends MessagePayload { + + /** + * discriminator value for CustomerStoresSetMessagePayload + */ + String CUSTOMER_STORES_SET = "CustomerStoresSet"; + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @return stores + */ + @NotNull + @Valid + @JsonProperty("stores") + public List getStores(); + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @return oldStores + */ + @NotNull + @Valid + @JsonProperty("oldStores") + public List getOldStores(); + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores values to be set + */ + + @JsonIgnore + public void setOldStores(final StoreKeyReference... oldStores); + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores values to be set + */ + + public void setOldStores(final List oldStores); + + /** + * factory method + * @return instance of CustomerStoresSetMessagePayload + */ + public static CustomerStoresSetMessagePayload of() { + return new CustomerStoresSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CustomerStoresSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CustomerStoresSetMessagePayload of(final CustomerStoresSetMessagePayload template) { + CustomerStoresSetMessagePayloadImpl instance = new CustomerStoresSetMessagePayloadImpl(); + instance.setStores(template.getStores()); + instance.setOldStores(template.getOldStores()); + return instance; + } + + public CustomerStoresSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of CustomerStoresSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerStoresSetMessagePayload deepCopy(@Nullable final CustomerStoresSetMessagePayload template) { + if (template == null) { + return null; + } + CustomerStoresSetMessagePayloadImpl instance = new CustomerStoresSetMessagePayloadImpl(); + instance.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setOldStores(Optional.ofNullable(template.getOldStores()) + .map(t -> t.stream() + .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for CustomerStoresSetMessagePayload + * @return builder + */ + public static CustomerStoresSetMessagePayloadBuilder builder() { + return CustomerStoresSetMessagePayloadBuilder.of(); + } + + /** + * create builder for CustomerStoresSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerStoresSetMessagePayloadBuilder builder(final CustomerStoresSetMessagePayload template) { + return CustomerStoresSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerStoresSetMessagePayload(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/CustomerStoresSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..94c49e9800b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayloadBuilder.java @@ -0,0 +1,264 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerStoresSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerStoresSetMessagePayload customerStoresSetMessagePayload = CustomerStoresSetMessagePayload.builder()
+ *             .plusStores(storesBuilder -> storesBuilder)
+ *             .plusOldStores(oldStoresBuilder -> oldStoresBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerStoresSetMessagePayloadBuilder implements Builder { + + private java.util.List stores; + + private java.util.List oldStores; + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores value to be set + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder stores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer is associated with after the Set Stores update action.

+ * @param stores value to be set + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder plusStores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder plusStores( + Function builder) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder withStores( + Function builder) { + this.stores = new ArrayList<>(); + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer is associated with after the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores value to be set + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder oldStores( + final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + this.oldStores = new ArrayList<>(Arrays.asList(oldStores)); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

+ * @param oldStores value to be set + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder plusOldStores( + final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + if (this.oldStores == null) { + this.oldStores = new ArrayList<>(); + } + this.oldStores.addAll(Arrays.asList(oldStores)); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param builder function to build the oldStores value + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder plusOldStores( + Function builder) { + if (this.oldStores == null) { + this.oldStores = new ArrayList<>(); + } + this.oldStores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ * @param builder function to build the oldStores value + * @return Builder + */ + + public CustomerStoresSetMessagePayloadBuilder withOldStores( + Function builder) { + this.oldStores = new ArrayList<>(); + this.oldStores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

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

The Stores the Customer was associated with before the Set Stores update action.

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

The Stores the Customer is associated with after the Set Stores update action.

+ * @return stores + */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

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

Generated after a successful Set Stores update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerStoresSetMessagePayloadImpl implements CustomerStoresSetMessagePayload, ModelBase { + + private String type; + + private java.util.List stores; + + private java.util.List oldStores; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerStoresSetMessagePayloadImpl( + @JsonProperty("stores") final java.util.List stores, + @JsonProperty("oldStores") final java.util.List oldStores) { + this.stores = stores; + this.oldStores = oldStores; + this.type = CUSTOMER_STORES_SET; + } + + /** + * create empty instance + */ + public CustomerStoresSetMessagePayloadImpl() { + this.type = CUSTOMER_STORES_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The Stores the Customer is associated with after the Set Stores update action.

+ */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

The Stores the Customer was associated with before the Set Stores update action.

+ */ + + public java.util.List getOldStores() { + return this.oldStores; + } + + public void setStores(final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + + public void setOldStores(final com.commercetools.api.models.store.StoreKeyReference... oldStores) { + this.oldStores = new ArrayList<>(Arrays.asList(oldStores)); + } + + public void setOldStores(final java.util.List oldStores) { + this.oldStores = oldStores; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerStoresSetMessagePayloadImpl that = (CustomerStoresSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(stores, that.stores) + .append(oldStores, that.oldStores) + .append(type, that.type) + .append(stores, that.stores) + .append(oldStores, that.oldStores) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(stores).append(oldStores).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("stores", stores) + .append("oldStores", oldStores) + .build(); + } + + @Override + public CustomerStoresSetMessagePayload copyDeep() { + return CustomerStoresSetMessagePayload.deepCopy(this); + } +} 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 4bfbcf5670e..3501761e021 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 @@ -877,6 +877,22 @@ public static com.commercetools.api.models.message.CustomerDateOfBirthSetMessage return com.commercetools.api.models.message.CustomerDateOfBirthSetMessageBuilder.of(); } + /** + * builder for customerDefaultBillingAddressSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessageBuilder customerDefaultBillingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessageBuilder.of(); + } + + /** + * builder for customerDefaultShippingAddressSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessageBuilder customerDefaultShippingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessageBuilder.of(); + } + /** * builder for customerDeleted subtype * @return builder @@ -1013,6 +1029,14 @@ public static com.commercetools.api.models.message.CustomerPasswordUpdatedMessag return com.commercetools.api.models.message.CustomerPasswordUpdatedMessageBuilder.of(); } + /** + * builder for customerStoresSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerStoresSetMessageBuilder customerStoresSetBuilder() { + return com.commercetools.api.models.message.CustomerStoresSetMessageBuilder.of(); + } + /** * builder for customerTitleSet 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 63aa1581b8b..75dde3319c7 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 @@ -331,6 +331,14 @@ public com.commercetools.api.models.message.CustomerDateOfBirthSetMessageBuilder return com.commercetools.api.models.message.CustomerDateOfBirthSetMessageBuilder.of(); } + public com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessageBuilder customerDefaultBillingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessageBuilder customerDefaultShippingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessageBuilder.of(); + } + public com.commercetools.api.models.message.CustomerDeletedMessageBuilder customerDeletedBuilder() { return com.commercetools.api.models.message.CustomerDeletedMessageBuilder.of(); } @@ -399,6 +407,10 @@ public com.commercetools.api.models.message.CustomerPasswordUpdatedMessageBuilde return com.commercetools.api.models.message.CustomerPasswordUpdatedMessageBuilder.of(); } + public com.commercetools.api.models.message.CustomerStoresSetMessageBuilder customerStoresSetBuilder() { + return com.commercetools.api.models.message.CustomerStoresSetMessageBuilder.of(); + } + public com.commercetools.api.models.message.CustomerTitleSetMessageBuilder customerTitleSetBuilder() { return com.commercetools.api.models.message.CustomerTitleSetMessageBuilder.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 5c1454b3db7..6d210e3c1a7 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 @@ -701,6 +701,22 @@ public static com.commercetools.api.models.message.CustomerDateOfBirthSetMessage return com.commercetools.api.models.message.CustomerDateOfBirthSetMessagePayloadBuilder.of(); } + /** + * builder for customerDefaultBillingAddressSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessagePayloadBuilder customerDefaultBillingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessagePayloadBuilder.of(); + } + + /** + * builder for customerDefaultShippingAddressSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessagePayloadBuilder customerDefaultShippingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessagePayloadBuilder.of(); + } + /** * builder for customerDeleted subtype * @return builder @@ -837,6 +853,14 @@ public static com.commercetools.api.models.message.CustomerPasswordUpdatedMessag return com.commercetools.api.models.message.CustomerPasswordUpdatedMessagePayloadBuilder.of(); } + /** + * builder for customerStoresSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.CustomerStoresSetMessagePayloadBuilder customerStoresSetBuilder() { + return com.commercetools.api.models.message.CustomerStoresSetMessagePayloadBuilder.of(); + } + /** * builder for customerTitleSet 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 e4f7464b817..05e351ca043 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 @@ -331,6 +331,14 @@ public com.commercetools.api.models.message.CustomerDateOfBirthSetMessagePayload return com.commercetools.api.models.message.CustomerDateOfBirthSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessagePayloadBuilder customerDefaultBillingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultBillingAddressSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessagePayloadBuilder customerDefaultShippingAddressSetBuilder() { + return com.commercetools.api.models.message.CustomerDefaultShippingAddressSetMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.CustomerDeletedMessagePayloadBuilder customerDeletedBuilder() { return com.commercetools.api.models.message.CustomerDeletedMessagePayloadBuilder.of(); } @@ -399,6 +407,10 @@ public com.commercetools.api.models.message.CustomerPasswordUpdatedMessagePayloa return com.commercetools.api.models.message.CustomerPasswordUpdatedMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.CustomerStoresSetMessagePayloadBuilder customerStoresSetBuilder() { + return com.commercetools.api.models.message.CustomerStoresSetMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.CustomerTitleSetMessagePayloadBuilder customerTitleSetBuilder() { return com.commercetools.api.models.message.CustomerTitleSetMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..ea01f91b8f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl of() { + return new CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl of(final List path) { + return new CustomerDefaultBillingAddressSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..2d27379f112 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl of() { + return new CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl of(final List path) { + return new CustomerDefaultShippingAddressSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerStoresSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerStoresSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..f73b1566942 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CustomerStoresSetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class CustomerStoresSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private CustomerStoresSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static CustomerStoresSetMessageExpansionBuilderDsl of() { + return new CustomerStoresSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static CustomerStoresSetMessageExpansionBuilderDsl of(final List path) { + return new CustomerStoresSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..d1f3e066050 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl { + public CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl() { + } + + public static CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl of() { + return new CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate address( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("address")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AddressQueryBuilderDsl.of())), + CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..2982fd56949 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultBillingAddressSetMessageQueryBuilderDsl.java @@ -0,0 +1,103 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerDefaultBillingAddressSetMessageQueryBuilderDsl { + public CustomerDefaultBillingAddressSetMessageQueryBuilderDsl() { + } + + public static CustomerDefaultBillingAddressSetMessageQueryBuilderDsl of() { + return new CustomerDefaultBillingAddressSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate address( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("address")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AddressQueryBuilderDsl.of())), + CustomerDefaultBillingAddressSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..b9f7f97ed1d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl { + public CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl() { + } + + public static CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl of() { + return new CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), p -> new CombinationQueryPredicate<>(p, + CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate address( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("address")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AddressQueryBuilderDsl.of())), + CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..3185007ca46 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerDefaultShippingAddressSetMessageQueryBuilderDsl.java @@ -0,0 +1,103 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerDefaultShippingAddressSetMessageQueryBuilderDsl { + public CustomerDefaultShippingAddressSetMessageQueryBuilderDsl() { + } + + public static CustomerDefaultShippingAddressSetMessageQueryBuilderDsl of() { + return new CustomerDefaultShippingAddressSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::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())), + CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate address( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("address")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AddressQueryBuilderDsl.of())), + CustomerDefaultShippingAddressSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..b632bb6f0bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,48 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerStoresSetMessagePayloadQueryBuilderDsl { + public CustomerStoresSetMessagePayloadQueryBuilderDsl() { + } + + public static CustomerStoresSetMessagePayloadQueryBuilderDsl of() { + return new CustomerStoresSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate stores( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("stores")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + CustomerStoresSetMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder stores() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("stores")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate oldStores( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldStores")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + CustomerStoresSetMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder oldStores() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldStores")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..a0f829ff1fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CustomerStoresSetMessageQueryBuilderDsl.java @@ -0,0 +1,120 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerStoresSetMessageQueryBuilderDsl { + public CustomerStoresSetMessageQueryBuilderDsl() { + } + + public static CustomerStoresSetMessageQueryBuilderDsl of() { + return new CustomerStoresSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::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())), + CustomerStoresSetMessageQueryBuilderDsl::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())), + CustomerStoresSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::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())), + CustomerStoresSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::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())), + CustomerStoresSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate stores( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("stores")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + CustomerStoresSetMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder stores() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("stores")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate oldStores( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldStores")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + CustomerStoresSetMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder oldStores() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldStores")), + p -> new CombinationQueryPredicate<>(p, CustomerStoresSetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index deecd62fd46..1a8eb3ac1fb 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 @@ -630,6 +630,22 @@ public CombinationQueryPredicate asCustomerDateOf MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asCustomerDefaultBillingAddressSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.CustomerDefaultBillingAddressSetMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asCustomerDefaultShippingAddressSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.CustomerDefaultShippingAddressSetMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCustomerDeleted( Function> fn) { return new CombinationQueryPredicate<>( @@ -762,6 +778,14 @@ public CombinationQueryPredicate asCustomerPasswo MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asCustomerStoresSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.CustomerStoresSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCustomerTitleSet( 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 89528bd856e..d6fa840ac86 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 @@ -683,6 +683,21 @@ public CombinationQueryPredicate asCustomerDateOfBirthSe MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asCustomerDefaultBillingAddressSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.CustomerDefaultBillingAddressSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asCustomerDefaultShippingAddressSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.CustomerDefaultShippingAddressSetMessageQueryBuilderDsl + .of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCustomerDeleted( Function> fn) { return new CombinationQueryPredicate<>( @@ -807,6 +822,13 @@ public CombinationQueryPredicate asCustomerPasswordUpdat MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asCustomerStoresSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.CustomerStoresSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCustomerTitleSet( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java index b6cf3aa5041..81f8d21bc0f 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java @@ -87,7 +87,28 @@ public static Object[][] requestWithMethodParameters() { .recurrencePolicies() .withId("test_ID") .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) - .createHttpRequest(), "post", "test_projectKey/recurrence-policies/test_ID", } }; + .createHttpRequest(), "post", "test_projectKey/recurrence-policies/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/recurrence-policies/test_ID?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", "test_projectKey/recurrence-policies/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .delete() + .createHttpRequest(), "delete", "test_projectKey/recurrence-policies/test_ID", } }; } public static Object[][] executeMethodParameters() { @@ -109,6 +130,18 @@ public static Object[][] executeMethodParameters() { new Object[] { apiRoot.withProjectKey("test_projectKey") .recurrencePolicies() .withId("test_ID") - .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), } }; + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .delete() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().withId("test_ID").delete(), } }; } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java index e4b94061c5b..07345cde162 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java @@ -87,7 +87,28 @@ public static Object[][] requestWithMethodParameters() { .recurrencePolicies() .withKey("test_key") .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) - .createHttpRequest(), "post", "test_projectKey/recurrence-policies/key=test_key", } }; + .createHttpRequest(), "post", "test_projectKey/recurrence-policies/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/recurrence-policies/key=test_key?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete() + .withExpand("expand") + .createHttpRequest(), + "delete", "test_projectKey/recurrence-policies/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete() + .createHttpRequest(), "delete", "test_projectKey/recurrence-policies/key=test_key", } }; } public static Object[][] executeMethodParameters() { @@ -109,6 +130,20 @@ public static Object[][] executeMethodParameters() { new Object[] { apiRoot.withProjectKey("test_projectKey") .recurrencePolicies() .withKey("test_key") - .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), } }; + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .delete(), } }; } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadTest.java new file mode 100644 index 00000000000..3432e7c2ee9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessagePayloadTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerDefaultBillingAddressSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerDefaultBillingAddressSetMessagePayloadBuilder builder) { + CustomerDefaultBillingAddressSetMessagePayload customerDefaultBillingAddressSetMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(customerDefaultBillingAddressSetMessagePayload) + .isInstanceOf(CustomerDefaultBillingAddressSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "address", CustomerDefaultBillingAddressSetMessagePayload.builder() + .address(new com.commercetools.api.models.common.AddressImpl()) } }; + } + + @Test + public void address() { + CustomerDefaultBillingAddressSetMessagePayload value = CustomerDefaultBillingAddressSetMessagePayload.of(); + value.setAddress(new com.commercetools.api.models.common.AddressImpl()); + Assertions.assertThat(value.getAddress()).isEqualTo(new com.commercetools.api.models.common.AddressImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageTest.java new file mode 100644 index 00000000000..3205f2fbadb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultBillingAddressSetMessageTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerDefaultBillingAddressSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerDefaultBillingAddressSetMessageBuilder builder) { + CustomerDefaultBillingAddressSetMessage customerDefaultBillingAddressSetMessage = builder.buildUnchecked(); + Assertions.assertThat(customerDefaultBillingAddressSetMessage) + .isInstanceOf(CustomerDefaultBillingAddressSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "address", CustomerDefaultBillingAddressSetMessage.builder() + .address(new com.commercetools.api.models.common.AddressImpl()) } }; + } + + @Test + public void address() { + CustomerDefaultBillingAddressSetMessage value = CustomerDefaultBillingAddressSetMessage.of(); + value.setAddress(new com.commercetools.api.models.common.AddressImpl()); + Assertions.assertThat(value.getAddress()).isEqualTo(new com.commercetools.api.models.common.AddressImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadTest.java new file mode 100644 index 00000000000..6ef26d75ef3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessagePayloadTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerDefaultShippingAddressSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerDefaultShippingAddressSetMessagePayloadBuilder builder) { + CustomerDefaultShippingAddressSetMessagePayload customerDefaultShippingAddressSetMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(customerDefaultShippingAddressSetMessagePayload) + .isInstanceOf(CustomerDefaultShippingAddressSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "address", CustomerDefaultShippingAddressSetMessagePayload.builder() + .address(new com.commercetools.api.models.common.AddressImpl()) } }; + } + + @Test + public void address() { + CustomerDefaultShippingAddressSetMessagePayload value = CustomerDefaultShippingAddressSetMessagePayload.of(); + value.setAddress(new com.commercetools.api.models.common.AddressImpl()); + Assertions.assertThat(value.getAddress()).isEqualTo(new com.commercetools.api.models.common.AddressImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageTest.java new file mode 100644 index 00000000000..e10105750cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerDefaultShippingAddressSetMessageTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerDefaultShippingAddressSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerDefaultShippingAddressSetMessageBuilder builder) { + CustomerDefaultShippingAddressSetMessage customerDefaultShippingAddressSetMessage = builder.buildUnchecked(); + Assertions.assertThat(customerDefaultShippingAddressSetMessage) + .isInstanceOf(CustomerDefaultShippingAddressSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "address", CustomerDefaultShippingAddressSetMessage.builder() + .address(new com.commercetools.api.models.common.AddressImpl()) } }; + } + + @Test + public void address() { + CustomerDefaultShippingAddressSetMessage value = CustomerDefaultShippingAddressSetMessage.of(); + value.setAddress(new com.commercetools.api.models.common.AddressImpl()); + Assertions.assertThat(value.getAddress()).isEqualTo(new com.commercetools.api.models.common.AddressImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayloadTest.java new file mode 100644 index 00000000000..0cda2aa71a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessagePayloadTest.java @@ -0,0 +1,47 @@ + +package com.commercetools.api.models.message; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerStoresSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerStoresSetMessagePayloadBuilder builder) { + CustomerStoresSetMessagePayload customerStoresSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(customerStoresSetMessagePayload).isInstanceOf(CustomerStoresSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "stores", + CustomerStoresSetMessagePayload.builder() + .stores(Collections.singletonList( + new com.commercetools.api.models.store.StoreKeyReferenceImpl())) }, + new Object[] { "oldStores", + CustomerStoresSetMessagePayload.builder() + .oldStores(Collections.singletonList( + new com.commercetools.api.models.store.StoreKeyReferenceImpl())) } }; + } + + @Test + public void stores() { + CustomerStoresSetMessagePayload value = CustomerStoresSetMessagePayload.of(); + value.setStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + Assertions.assertThat(value.getStores()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + } + + @Test + public void oldStores() { + CustomerStoresSetMessagePayload value = CustomerStoresSetMessagePayload.of(); + value.setOldStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + Assertions.assertThat(value.getOldStores()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageTest.java new file mode 100644 index 00000000000..c3e8dca4ff3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CustomerStoresSetMessageTest.java @@ -0,0 +1,47 @@ + +package com.commercetools.api.models.message; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerStoresSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerStoresSetMessageBuilder builder) { + CustomerStoresSetMessage customerStoresSetMessage = builder.buildUnchecked(); + Assertions.assertThat(customerStoresSetMessage).isInstanceOf(CustomerStoresSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "stores", + CustomerStoresSetMessage.builder() + .stores(Collections.singletonList( + new com.commercetools.api.models.store.StoreKeyReferenceImpl())) }, + new Object[] { "oldStores", + CustomerStoresSetMessage.builder() + .oldStores(Collections.singletonList( + new com.commercetools.api.models.store.StoreKeyReferenceImpl())) } }; + } + + @Test + public void stores() { + CustomerStoresSetMessage value = CustomerStoresSetMessage.of(); + value.setStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + Assertions.assertThat(value.getStores()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + } + + @Test + public void oldStores() { + CustomerStoresSetMessage value = CustomerStoresSetMessage.of(); + value.setOldStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + Assertions.assertThat(value.getOldStores()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost.java new file mode 100644 index 00000000000..d17c82a6e36 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost.java @@ -0,0 +1,149 @@ + +package com.commercetools.importapi.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Creates an Import Request for Business Units.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKeyValue("{projectKey}")
+ *            .businessUnits()
+ *            .importContainers()
+ *            .withImportContainerKeyValue("{importContainerKey}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost extends + TypeBodyApiMethod + implements + com.commercetools.importapi.client.Secured_by_manage_business_unitsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String importContainerKey; + + private com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest businessUnitImportRequest; + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost(final ApiHttpClient apiHttpClient, + String projectKey, String importContainerKey, + com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest businessUnitImportRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + this.businessUnitImportRequest = businessUnitImportRequest; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost( + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.importContainerKey = t.importContainerKey; + this.businessUnitImportRequest = t.businessUnitImportRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/business-units/import-containers/%s", + encodePathParam(this.projectKey), encodePathParam(this.importContainerKey)); + 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(businessUnitImportRequest))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getImportContainerKey() { + return this.importContainerKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setImportContainerKey(final String importContainerKey) { + this.importContainerKey = importContainerKey; + } + + public com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest getBody() { + return businessUnitImportRequest; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost withBody( + com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest businessUnitImportRequest) { + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost t = copy(); + t.businessUnitImportRequest = businessUnitImportRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost that = (ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(importContainerKey, that.importContainerKey) + .append(businessUnitImportRequest, that.businessUnitImportRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(importContainerKey) + .append(businessUnitImportRequest) + .toHashCode(); + } + + @Override + protected ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost copy() { + return new ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString.java new file mode 100644 index 00000000000..f7e0248798f --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString.java @@ -0,0 +1,148 @@ + +package com.commercetools.importapi.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Creates an Import Request for Business Units.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKeyValue("{projectKey}")
+ *            .businessUnits()
+ *            .importContainers()
+ *            .withImportContainerKeyValue("{importContainerKey}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString extends + StringBodyApiMethod + implements + com.commercetools.importapi.client.Secured_by_manage_business_unitsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String importContainerKey; + + private String businessUnitImportRequest; + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString(final ApiHttpClient apiHttpClient, + String projectKey, String importContainerKey, String businessUnitImportRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + this.businessUnitImportRequest = businessUnitImportRequest; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString( + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.importContainerKey = t.importContainerKey; + this.businessUnitImportRequest = t.businessUnitImportRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/business-units/import-containers/%s", this.projectKey, + this.importContainerKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + businessUnitImportRequest.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getImportContainerKey() { + return this.importContainerKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setImportContainerKey(final String importContainerKey) { + this.importContainerKey = importContainerKey; + } + + public String getBody() { + return businessUnitImportRequest; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString withBody( + String businessUnitImportRequest) { + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString t = copy(); + t.businessUnitImportRequest = businessUnitImportRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString that = (ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(importContainerKey, that.importContainerKey) + .append(businessUnitImportRequest, that.businessUnitImportRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(importContainerKey) + .append(businessUnitImportRequest) + .toHashCode(); + } + + @Override + protected ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString copy() { + return new ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder.java new file mode 100644 index 00000000000..bfe62d30dbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder.java @@ -0,0 +1,41 @@ + +package com.commercetools.importapi.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 ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String importContainerKey; + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder( + final ApiHttpClient apiHttpClient, final String projectKey, final String importContainerKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost post( + com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest businessUnitImportRequest) { + return new ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost(apiHttpClient, projectKey, + importContainerKey, businessUnitImportRequest); + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString post( + final String businessUnitImportRequest) { + return new ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPostString(apiHttpClient, projectKey, + importContainerKey, businessUnitImportRequest); + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.importapi.models.importrequests.BusinessUnitImportRequestBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersRequestBuilder.java new file mode 100644 index 00000000000..ddc8c3d2665 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsImportContainersRequestBuilder.java @@ -0,0 +1,25 @@ + +package com.commercetools.importapi.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 ByProjectKeyBusinessUnitsImportContainersRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyBusinessUnitsImportContainersRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder withImportContainerKeyValue( + String importContainerKey) { + return new ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyRequestBuilder(apiHttpClient, + projectKey, importContainerKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsRequestBuilder.java new file mode 100644 index 00000000000..edd2c4d32dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyBusinessUnitsRequestBuilder.java @@ -0,0 +1,22 @@ + +package com.commercetools.importapi.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 ByProjectKeyBusinessUnitsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyBusinessUnitsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyBusinessUnitsImportContainersRequestBuilder importContainers() { + return new ByProjectKeyBusinessUnitsImportContainersRequestBuilder(apiHttpClient, projectKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java index e5a0ab41640..e6c0b45e484 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java @@ -83,4 +83,8 @@ public ByProjectKeyProductSelectionsRequestBuilder productSelections() { return new ByProjectKeyProductSelectionsRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyBusinessUnitsRequestBuilder businessUnits() { + return new ByProjectKeyBusinessUnitsRequestBuilder(apiHttpClient, projectKey); + } + } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_business_unitsTrait.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_business_unitsTrait.java new file mode 100644 index 00000000000..b8e2a4068ad --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_business_unitsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.importapi.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_business_unitsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_business_unitsTrait> { + + default Secured_by_manage_business_unitsTrait asSecured_by_manage_business_unitsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_business_unitsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraft.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraft.java new file mode 100644 index 00000000000..285e1862e57 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraft.java @@ -0,0 +1,160 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.importapi.models.common.CustomerKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Draft for an Associate in a Business Unit.

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

+ *     AssociateDraft associateDraft = AssociateDraft.builder()
+ *             .customer(customerBuilder -> customerBuilder)
+ *             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateDraftImpl.class) +public interface AssociateDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

The Customer to be part of the Business Unit.

+ * @return customer + */ + @NotNull + @Valid + @JsonProperty("customer") + public CustomerKeyReference getCustomer(); + + /** + *

The roles to assign to the Associate.

+ * @return associateRoleAssignments + */ + @NotNull + @Valid + @JsonProperty("associateRoleAssignments") + public List getAssociateRoleAssignments(); + + /** + *

The Customer to be part of the Business Unit.

+ * @param customer value to be set + */ + + public void setCustomer(final CustomerKeyReference customer); + + /** + *

The roles to assign to the Associate.

+ * @param associateRoleAssignments values to be set + */ + + @JsonIgnore + public void setAssociateRoleAssignments(final AssociateRoleAssignmentDraft... associateRoleAssignments); + + /** + *

The roles to assign to the Associate.

+ * @param associateRoleAssignments values to be set + */ + + public void setAssociateRoleAssignments(final List associateRoleAssignments); + + /** + * factory method + * @return instance of AssociateDraft + */ + public static AssociateDraft of() { + return new AssociateDraftImpl(); + } + + /** + * factory method to create a shallow copy AssociateDraft + * @param template instance to be copied + * @return copy instance + */ + public static AssociateDraft of(final AssociateDraft template) { + AssociateDraftImpl instance = new AssociateDraftImpl(); + instance.setCustomer(template.getCustomer()); + instance.setAssociateRoleAssignments(template.getAssociateRoleAssignments()); + return instance; + } + + public AssociateDraft copyDeep(); + + /** + * factory method to create a deep copy of AssociateDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AssociateDraft deepCopy(@Nullable final AssociateDraft template) { + if (template == null) { + return null; + } + AssociateDraftImpl instance = new AssociateDraftImpl(); + instance.setCustomer( + com.commercetools.importapi.models.common.CustomerKeyReference.deepCopy(template.getCustomer())); + instance.setAssociateRoleAssignments(Optional.ofNullable(template.getAssociateRoleAssignments()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for AssociateDraft + * @return builder + */ + public static AssociateDraftBuilder builder() { + return AssociateDraftBuilder.of(); + } + + /** + * create builder for AssociateDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateDraftBuilder builder(final AssociateDraft template) { + return AssociateDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociateDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftBuilder.java new file mode 100644 index 00000000000..9fe4610defb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftBuilder.java @@ -0,0 +1,219 @@ + +package com.commercetools.importapi.models.business_units; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AssociateDraft associateDraft = AssociateDraft.builder()
+ *             .customer(customerBuilder -> customerBuilder)
+ *             .plusAssociateRoleAssignments(associateRoleAssignmentsBuilder -> associateRoleAssignmentsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateDraftBuilder implements Builder { + + private com.commercetools.importapi.models.common.CustomerKeyReference customer; + + private java.util.List associateRoleAssignments; + + /** + *

The Customer to be part of the Business Unit.

+ * @param builder function to build the customer value + * @return Builder + */ + + public AssociateDraftBuilder customer( + Function builder) { + this.customer = builder.apply(com.commercetools.importapi.models.common.CustomerKeyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

The Customer to be part of the Business Unit.

+ * @param builder function to build the customer value + * @return Builder + */ + + public AssociateDraftBuilder withCustomer( + Function builder) { + this.customer = builder.apply(com.commercetools.importapi.models.common.CustomerKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Customer to be part of the Business Unit.

+ * @param customer value to be set + * @return Builder + */ + + public AssociateDraftBuilder customer( + final com.commercetools.importapi.models.common.CustomerKeyReference customer) { + this.customer = customer; + return this; + } + + /** + *

The roles to assign to the Associate.

+ * @param associateRoleAssignments value to be set + * @return Builder + */ + + public AssociateDraftBuilder associateRoleAssignments( + final com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraft... associateRoleAssignments) { + this.associateRoleAssignments = new ArrayList<>(Arrays.asList(associateRoleAssignments)); + return this; + } + + /** + *

The roles to assign to the Associate.

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

The roles to assign to the Associate.

+ * @param associateRoleAssignments value to be set + * @return Builder + */ + + public AssociateDraftBuilder plusAssociateRoleAssignments( + final com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraft... associateRoleAssignments) { + if (this.associateRoleAssignments == null) { + this.associateRoleAssignments = new ArrayList<>(); + } + this.associateRoleAssignments.addAll(Arrays.asList(associateRoleAssignments)); + return this; + } + + /** + *

The roles to assign to the Associate.

+ * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateDraftBuilder plusAssociateRoleAssignments( + Function builder) { + if (this.associateRoleAssignments == null) { + this.associateRoleAssignments = new ArrayList<>(); + } + this.associateRoleAssignments.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftBuilder.of()) + .build()); + return this; + } + + /** + *

The roles to assign to the Associate.

+ * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateDraftBuilder withAssociateRoleAssignments( + Function builder) { + this.associateRoleAssignments = new ArrayList<>(); + this.associateRoleAssignments.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftBuilder.of()) + .build()); + return this; + } + + /** + *

The roles to assign to the Associate.

+ * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateDraftBuilder addAssociateRoleAssignments( + Function builder) { + return plusAssociateRoleAssignments( + builder.apply(com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftBuilder.of())); + } + + /** + *

The roles to assign to the Associate.

+ * @param builder function to build the associateRoleAssignments value + * @return Builder + */ + + public AssociateDraftBuilder setAssociateRoleAssignments( + Function builder) { + return associateRoleAssignments( + builder.apply(com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftBuilder.of())); + } + + /** + *

The Customer to be part of the Business Unit.

+ * @return customer + */ + + public com.commercetools.importapi.models.common.CustomerKeyReference getCustomer() { + return this.customer; + } + + /** + *

The roles to assign to the Associate.

+ * @return associateRoleAssignments + */ + + public java.util.List getAssociateRoleAssignments() { + return this.associateRoleAssignments; + } + + /** + * builds AssociateDraft with checking for non-null required values + * @return AssociateDraft + */ + public AssociateDraft build() { + Objects.requireNonNull(customer, AssociateDraft.class + ": customer is missing"); + Objects.requireNonNull(associateRoleAssignments, + AssociateDraft.class + ": associateRoleAssignments is missing"); + return new AssociateDraftImpl(customer, associateRoleAssignments); + } + + /** + * builds AssociateDraft without checking for non-null required values + * @return AssociateDraft + */ + public AssociateDraft buildUnchecked() { + return new AssociateDraftImpl(customer, associateRoleAssignments); + } + + /** + * factory method for an instance of AssociateDraftBuilder + * @return builder + */ + public static AssociateDraftBuilder of() { + return new AssociateDraftBuilder(); + } + + /** + * create builder for AssociateDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateDraftBuilder of(final AssociateDraft template) { + AssociateDraftBuilder builder = new AssociateDraftBuilder(); + builder.customer = template.getCustomer(); + builder.associateRoleAssignments = template.getAssociateRoleAssignments(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftImpl.java new file mode 100644 index 00000000000..fa17aa05b83 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftImpl.java @@ -0,0 +1,109 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Draft for an Associate in a Business Unit.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateDraftImpl implements AssociateDraft, ModelBase { + + private com.commercetools.importapi.models.common.CustomerKeyReference customer; + + private java.util.List associateRoleAssignments; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateDraftImpl( + @JsonProperty("customer") final com.commercetools.importapi.models.common.CustomerKeyReference customer, + @JsonProperty("associateRoleAssignments") final java.util.List associateRoleAssignments) { + this.customer = customer; + this.associateRoleAssignments = associateRoleAssignments; + } + + /** + * create empty instance + */ + public AssociateDraftImpl() { + } + + /** + *

The Customer to be part of the Business Unit.

+ */ + + public com.commercetools.importapi.models.common.CustomerKeyReference getCustomer() { + return this.customer; + } + + /** + *

The roles to assign to the Associate.

+ */ + + public java.util.List getAssociateRoleAssignments() { + return this.associateRoleAssignments; + } + + public void setCustomer(final com.commercetools.importapi.models.common.CustomerKeyReference customer) { + this.customer = customer; + } + + public void setAssociateRoleAssignments( + final com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraft... associateRoleAssignments) { + this.associateRoleAssignments = new ArrayList<>(Arrays.asList(associateRoleAssignments)); + } + + public void setAssociateRoleAssignments( + final java.util.List associateRoleAssignments) { + this.associateRoleAssignments = associateRoleAssignments; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AssociateDraftImpl that = (AssociateDraftImpl) o; + + return new EqualsBuilder().append(customer, that.customer) + .append(associateRoleAssignments, that.associateRoleAssignments) + .append(customer, that.customer) + .append(associateRoleAssignments, that.associateRoleAssignments) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(customer).append(associateRoleAssignments).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("customer", customer) + .append("associateRoleAssignments", associateRoleAssignments) + .build(); + } + + @Override + public AssociateDraft copyDeep() { + return AssociateDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraft.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraft.java new file mode 100644 index 00000000000..c44bfd74bbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraft.java @@ -0,0 +1,146 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.importapi.models.common.AssociateRoleKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

The role of an Associate in a Business Unit.

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

+ *     AssociateRoleAssignmentDraft associateRoleAssignmentDraft = AssociateRoleAssignmentDraft.builder()
+ *             .associateRole(associateRoleBuilder -> associateRoleBuilder)
+ *             .inheritance(AssociateRoleInheritanceMode.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateRoleAssignmentDraftImpl.class) +public interface AssociateRoleAssignmentDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

The role to assign to the Associate.

+ * @return associateRole + */ + @NotNull + @Valid + @JsonProperty("associateRole") + public AssociateRoleKeyReference getAssociateRole(); + + /** + *

Determines whether the AssociateRole is inherited. If Disabled, the AssociateRole is not inherited from a parent Business Unit.

+ * @return inheritance + */ + @NotNull + @JsonProperty("inheritance") + public AssociateRoleInheritanceMode getInheritance(); + + /** + *

The role to assign to the Associate.

+ * @param associateRole value to be set + */ + + public void setAssociateRole(final AssociateRoleKeyReference associateRole); + + /** + *

Determines whether the AssociateRole is inherited. If Disabled, the AssociateRole is not inherited from a parent Business Unit.

+ * @param inheritance value to be set + */ + + public void setInheritance(final AssociateRoleInheritanceMode inheritance); + + /** + * factory method + * @return instance of AssociateRoleAssignmentDraft + */ + public static AssociateRoleAssignmentDraft of() { + return new AssociateRoleAssignmentDraftImpl(); + } + + /** + * factory method to create a shallow copy AssociateRoleAssignmentDraft + * @param template instance to be copied + * @return copy instance + */ + public static AssociateRoleAssignmentDraft of(final AssociateRoleAssignmentDraft template) { + AssociateRoleAssignmentDraftImpl instance = new AssociateRoleAssignmentDraftImpl(); + instance.setAssociateRole(template.getAssociateRole()); + instance.setInheritance(template.getInheritance()); + return instance; + } + + public AssociateRoleAssignmentDraft copyDeep(); + + /** + * factory method to create a deep copy of AssociateRoleAssignmentDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AssociateRoleAssignmentDraft deepCopy(@Nullable final AssociateRoleAssignmentDraft template) { + if (template == null) { + return null; + } + AssociateRoleAssignmentDraftImpl instance = new AssociateRoleAssignmentDraftImpl(); + instance.setAssociateRole( + com.commercetools.importapi.models.common.AssociateRoleKeyReference.deepCopy(template.getAssociateRole())); + instance.setInheritance(template.getInheritance()); + return instance; + } + + /** + * builder factory method for AssociateRoleAssignmentDraft + * @return builder + */ + public static AssociateRoleAssignmentDraftBuilder builder() { + return AssociateRoleAssignmentDraftBuilder.of(); + } + + /** + * create builder for AssociateRoleAssignmentDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleAssignmentDraftBuilder builder(final AssociateRoleAssignmentDraft template) { + return AssociateRoleAssignmentDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociateRoleAssignmentDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftBuilder.java new file mode 100644 index 00000000000..f6abd6c4d0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftBuilder.java @@ -0,0 +1,137 @@ + +package com.commercetools.importapi.models.business_units; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateRoleAssignmentDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     AssociateRoleAssignmentDraft associateRoleAssignmentDraft = AssociateRoleAssignmentDraft.builder()
+ *             .associateRole(associateRoleBuilder -> associateRoleBuilder)
+ *             .inheritance(AssociateRoleInheritanceMode.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleAssignmentDraftBuilder implements Builder { + + private com.commercetools.importapi.models.common.AssociateRoleKeyReference associateRole; + + private com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode inheritance; + + /** + *

The role to assign to the Associate.

+ * @param builder function to build the associateRole value + * @return Builder + */ + + public AssociateRoleAssignmentDraftBuilder associateRole( + Function builder) { + this.associateRole = builder + .apply(com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

The role to assign to the Associate.

+ * @param builder function to build the associateRole value + * @return Builder + */ + + public AssociateRoleAssignmentDraftBuilder withAssociateRole( + Function builder) { + this.associateRole = builder + .apply(com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder.of()); + return this; + } + + /** + *

The role to assign to the Associate.

+ * @param associateRole value to be set + * @return Builder + */ + + public AssociateRoleAssignmentDraftBuilder associateRole( + final com.commercetools.importapi.models.common.AssociateRoleKeyReference associateRole) { + this.associateRole = associateRole; + return this; + } + + /** + *

Determines whether the AssociateRole is inherited. If Disabled, the AssociateRole is not inherited from a parent Business Unit.

+ * @param inheritance value to be set + * @return Builder + */ + + public AssociateRoleAssignmentDraftBuilder inheritance( + final com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode inheritance) { + this.inheritance = inheritance; + return this; + } + + /** + *

The role to assign to the Associate.

+ * @return associateRole + */ + + public com.commercetools.importapi.models.common.AssociateRoleKeyReference getAssociateRole() { + return this.associateRole; + } + + /** + *

Determines whether the AssociateRole is inherited. If Disabled, the AssociateRole is not inherited from a parent Business Unit.

+ * @return inheritance + */ + + public com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode getInheritance() { + return this.inheritance; + } + + /** + * builds AssociateRoleAssignmentDraft with checking for non-null required values + * @return AssociateRoleAssignmentDraft + */ + public AssociateRoleAssignmentDraft build() { + Objects.requireNonNull(associateRole, AssociateRoleAssignmentDraft.class + ": associateRole is missing"); + Objects.requireNonNull(inheritance, AssociateRoleAssignmentDraft.class + ": inheritance is missing"); + return new AssociateRoleAssignmentDraftImpl(associateRole, inheritance); + } + + /** + * builds AssociateRoleAssignmentDraft without checking for non-null required values + * @return AssociateRoleAssignmentDraft + */ + public AssociateRoleAssignmentDraft buildUnchecked() { + return new AssociateRoleAssignmentDraftImpl(associateRole, inheritance); + } + + /** + * factory method for an instance of AssociateRoleAssignmentDraftBuilder + * @return builder + */ + public static AssociateRoleAssignmentDraftBuilder of() { + return new AssociateRoleAssignmentDraftBuilder(); + } + + /** + * create builder for AssociateRoleAssignmentDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleAssignmentDraftBuilder of(final AssociateRoleAssignmentDraft template) { + AssociateRoleAssignmentDraftBuilder builder = new AssociateRoleAssignmentDraftBuilder(); + builder.associateRole = template.getAssociateRole(); + builder.inheritance = template.getInheritance(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftImpl.java new file mode 100644 index 00000000000..9679fe0a0e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The role of an Associate in a Business Unit.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleAssignmentDraftImpl implements AssociateRoleAssignmentDraft, ModelBase { + + private com.commercetools.importapi.models.common.AssociateRoleKeyReference associateRole; + + private com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode inheritance; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateRoleAssignmentDraftImpl( + @JsonProperty("associateRole") final com.commercetools.importapi.models.common.AssociateRoleKeyReference associateRole, + @JsonProperty("inheritance") final com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode inheritance) { + this.associateRole = associateRole; + this.inheritance = inheritance; + } + + /** + * create empty instance + */ + public AssociateRoleAssignmentDraftImpl() { + } + + /** + *

The role to assign to the Associate.

+ */ + + public com.commercetools.importapi.models.common.AssociateRoleKeyReference getAssociateRole() { + return this.associateRole; + } + + /** + *

Determines whether the AssociateRole is inherited. If Disabled, the AssociateRole is not inherited from a parent Business Unit.

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

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

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

Determines whether a Business Unit can inherit Approval Rules from a parent. Only Business Units of type Division can use ExplicitAndFromParent.

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

Approval Rules of a Business Unit must be explicitly assigned. The Business Unit cannot inherit Approval Rules from a parent.

*/ + BusinessUnitApprovalRuleMode EXPLICIT = BusinessUnitApprovalRuleModeEnum.EXPLICIT; + /** +

Approval Rules of a Business Unit are inherited from a parent and can also be explicitly assigned.

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

All Associates of a Business Unit must be explicitly assigned. The Business Unit cannot inherit Associates from a parent.

*/ + BusinessUnitAssociateMode EXPLICIT = BusinessUnitAssociateModeEnum.EXPLICIT; + /** +

Associates of a Business Unit can be assigned explicitly and inherited from a parent.

*/ + BusinessUnitAssociateMode EXPLICIT_AND_FROM_PARENT = BusinessUnitAssociateModeEnum.EXPLICIT_AND_FROM_PARENT; + + /** + * possible values of BusinessUnitAssociateMode + */ + enum BusinessUnitAssociateModeEnum implements BusinessUnitAssociateMode { + /** + * Explicit + */ + EXPLICIT("Explicit"), + + /** + * ExplicitAndFromParent + */ + EXPLICIT_AND_FROM_PARENT("ExplicitAndFromParent"); + private final String jsonName; + + private BusinessUnitAssociateModeEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of BusinessUnitAssociateMode + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static BusinessUnitAssociateMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitAssociateMode() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static BusinessUnitAssociateMode[] values() { + return BusinessUnitAssociateModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImport.java new file mode 100644 index 00000000000..011af0e4dd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImport.java @@ -0,0 +1,353 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.importapi.models.common.Address; +import com.commercetools.importapi.models.common.StoreKeyReference; +import com.commercetools.importapi.models.customfields.Custom; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Represents the data used to import a BusinessUnit. Can be of type Company or Division.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     BusinessUnitImport businessUnitImport = BusinessUnitImport.companyBuilder()
+ *             key("{key}")
+ *             name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "unitType", defaultImpl = BusinessUnitImportImpl.class, visible = true) +@JsonDeserialize(as = BusinessUnitImportImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitImport { + + /** + *

The type of Business Unit.

+ * @return unitType + */ + @NotNull + @JsonProperty("unitType") + public BusinessUnitType getUnitType(); + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ * @return status + */ + + @JsonProperty("status") + public BusinessUnitStatus getStatus(); + + /** + *

The contact email address for the Business Unit.

+ * @return contactEmail + */ + + @JsonProperty("contactEmail") + public String getContactEmail(); + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @return associates + */ + @Valid + @JsonProperty("associates") + public List getAssociates(); + + /** + *

The addresses for the Business Unit.

+ * @return addresses + */ + @Valid + @JsonProperty("addresses") + public List
getAddresses(); + + /** + *

The indices of the shipping addresses in the addresses array.

+ * @return shippingAddresses + */ + + @JsonProperty("shippingAddresses") + public List getShippingAddresses(); + + /** + *

The index of the default shipping address in the addresses array.

+ * @return defaultShippingAddress + */ + + @JsonProperty("defaultShippingAddress") + public Integer getDefaultShippingAddress(); + + /** + *

The indices of the billing addresses in the addresses array.

+ * @return billingAddresses + */ + + @JsonProperty("billingAddresses") + public List getBillingAddresses(); + + /** + *

The index of the default billing address in the addresses array.

+ * @return defaultBillingAddress + */ + + @JsonProperty("defaultBillingAddress") + public Integer getDefaultBillingAddress(); + + /** + *

The Stores of the Business Unit.

+ * @return stores + */ + @Valid + @JsonProperty("stores") + public List getStores(); + + /** + *

Custom fields for the Business Unit.

+ * @return custom + */ + @Valid + @JsonProperty("custom") + public Custom getCustom(); + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

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

The contact email address for the Business Unit.

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

List of Associates to be assigned to the Business Unit.

+ * @param associates values to be set + */ + + @JsonIgnore + public void setAssociates(final AssociateDraft... associates); + + /** + *

List of Associates to be assigned to the Business Unit.

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

The addresses for the Business Unit.

+ * @param addresses values to be set + */ + + @JsonIgnore + public void setAddresses(final Address... addresses); + + /** + *

The addresses for the Business Unit.

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

The indices of the shipping addresses in the addresses array.

+ * @param shippingAddresses values to be set + */ + + @JsonIgnore + public void setShippingAddresses(final Integer... shippingAddresses); + + /** + *

The indices of the shipping addresses in the addresses array.

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

The index of the default shipping address in the addresses array.

+ * @param defaultShippingAddress value to be set + */ + + public void setDefaultShippingAddress(final Integer defaultShippingAddress); + + /** + *

The indices of the billing addresses in the addresses array.

+ * @param billingAddresses values to be set + */ + + @JsonIgnore + public void setBillingAddresses(final Integer... billingAddresses); + + /** + *

The indices of the billing addresses in the addresses array.

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

The index of the default billing address in the addresses array.

+ * @param defaultBillingAddress value to be set + */ + + public void setDefaultBillingAddress(final Integer defaultBillingAddress); + + /** + *

The Stores of the Business Unit.

+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *

The Stores of the Business Unit.

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

Custom fields for the Business Unit.

+ * @param custom value to be set + */ + + public void setCustom(final Custom custom); + + public BusinessUnitImport copyDeep(); + + /** + * factory method to create a deep copy of BusinessUnitImport + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitImport deepCopy(@Nullable final BusinessUnitImport template) { + if (template == null) { + return null; + } + + if (!(template instanceof BusinessUnitImportImpl)) { + return template.copyDeep(); + } + BusinessUnitImportImpl instance = new BusinessUnitImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setStatus(template.getStatus()); + instance.setContactEmail(template.getContactEmail()); + instance.setAssociates(Optional.ofNullable(template.getAssociates()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.business_units.AssociateDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAddresses(Optional.ofNullable(template.getAddresses()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.Address::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setShippingAddresses( + Optional.ofNullable(template.getShippingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultShippingAddress(template.getDefaultShippingAddress()); + instance.setBillingAddresses( + Optional.ofNullable(template.getBillingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultBillingAddress(template.getDefaultBillingAddress()); + instance.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustom(com.commercetools.importapi.models.customfields.Custom.deepCopy(template.getCustom())); + return instance; + } + + /** + * builder for company subtype + * @return builder + */ + public static com.commercetools.importapi.models.business_units.CompanyBusinessUnitImportBuilder companyBuilder() { + return com.commercetools.importapi.models.business_units.CompanyBusinessUnitImportBuilder.of(); + } + + /** + * builder for division subtype + * @return builder + */ + public static com.commercetools.importapi.models.business_units.DivisionBusinessUnitImportBuilder divisionBuilder() { + return com.commercetools.importapi.models.business_units.DivisionBusinessUnitImportBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBusinessUnitImport(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportBuilder.java new file mode 100644 index 00000000000..f74c9a696d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportBuilder.java @@ -0,0 +1,30 @@ + +package com.commercetools.importapi.models.business_units; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitImportBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitImportBuilder { + + public com.commercetools.importapi.models.business_units.CompanyBusinessUnitImportBuilder companyBuilder() { + return com.commercetools.importapi.models.business_units.CompanyBusinessUnitImportBuilder.of(); + } + + public com.commercetools.importapi.models.business_units.DivisionBusinessUnitImportBuilder divisionBuilder() { + return com.commercetools.importapi.models.business_units.DivisionBusinessUnitImportBuilder.of(); + } + + /** + * factory method for an instance of BusinessUnitImportBuilder + * @return builder + */ + public static BusinessUnitImportBuilder of() { + return new BusinessUnitImportBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportImpl.java new file mode 100644 index 00000000000..a1f751c2db8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitImportImpl.java @@ -0,0 +1,341 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Represents the data used to import a BusinessUnit. Can be of type Company or Division.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitImportImpl implements BusinessUnitImport, ModelBase { + + private com.commercetools.importapi.models.business_units.BusinessUnitType unitType; + + private String key; + + private String name; + + private com.commercetools.importapi.models.business_units.BusinessUnitStatus status; + + private String contactEmail; + + private java.util.List associates; + + private java.util.List addresses; + + private java.util.List shippingAddresses; + + private Integer defaultShippingAddress; + + private java.util.List billingAddresses; + + private Integer defaultBillingAddress; + + private java.util.List stores; + + private com.commercetools.importapi.models.customfields.Custom custom; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitImportImpl( + @JsonProperty("unitType") final com.commercetools.importapi.models.business_units.BusinessUnitType unitType, + @JsonProperty("key") final String key, @JsonProperty("name") final String name, + @JsonProperty("status") final com.commercetools.importapi.models.business_units.BusinessUnitStatus status, + @JsonProperty("contactEmail") final String contactEmail, + @JsonProperty("associates") final java.util.List associates, + @JsonProperty("addresses") final java.util.List addresses, + @JsonProperty("shippingAddresses") final java.util.List shippingAddresses, + @JsonProperty("defaultShippingAddress") final Integer defaultShippingAddress, + @JsonProperty("billingAddresses") final java.util.List billingAddresses, + @JsonProperty("defaultBillingAddress") final Integer defaultBillingAddress, + @JsonProperty("stores") final java.util.List stores, + @JsonProperty("custom") final com.commercetools.importapi.models.customfields.Custom custom) { + this.unitType = unitType; + this.key = key; + this.name = name; + this.status = status; + this.contactEmail = contactEmail; + this.associates = associates; + this.addresses = addresses; + this.shippingAddresses = shippingAddresses; + this.defaultShippingAddress = defaultShippingAddress; + this.billingAddresses = billingAddresses; + this.defaultBillingAddress = defaultBillingAddress; + this.stores = stores; + this.custom = custom; + } + + /** + * create empty instance + */ + public BusinessUnitImportImpl() { + } + + /** + *

The type of Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitType getUnitType() { + return this.unitType; + } + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitStatus getStatus() { + return this.status; + } + + /** + *

The contact email address for the Business Unit.

+ */ + + public String getContactEmail() { + return this.contactEmail; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ */ + + public java.util.List getAssociates() { + return this.associates; + } + + /** + *

The addresses for the Business Unit.

+ */ + + public java.util.List getAddresses() { + return this.addresses; + } + + /** + *

The indices of the shipping addresses in the addresses array.

+ */ + + public java.util.List getShippingAddresses() { + return this.shippingAddresses; + } + + /** + *

The index of the default shipping address in the addresses array.

+ */ + + public Integer getDefaultShippingAddress() { + return this.defaultShippingAddress; + } + + /** + *

The indices of the billing addresses in the addresses array.

+ */ + + public java.util.List getBillingAddresses() { + return this.billingAddresses; + } + + /** + *

The index of the default billing address in the addresses array.

+ */ + + public Integer getDefaultBillingAddress() { + return this.defaultBillingAddress; + } + + /** + *

The Stores of the Business Unit.

+ */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

Custom fields for the Business Unit.

+ */ + + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final String name) { + this.name = name; + } + + public void setStatus(final com.commercetools.importapi.models.business_units.BusinessUnitStatus status) { + this.status = status; + } + + public void setContactEmail(final String contactEmail) { + this.contactEmail = contactEmail; + } + + public void setAssociates(final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + this.associates = new ArrayList<>(Arrays.asList(associates)); + } + + public void setAssociates( + final java.util.List associates) { + this.associates = associates; + } + + public void setAddresses(final com.commercetools.importapi.models.common.Address... addresses) { + this.addresses = new ArrayList<>(Arrays.asList(addresses)); + } + + public void setAddresses(final java.util.List addresses) { + this.addresses = addresses; + } + + public void setShippingAddresses(final Integer... shippingAddresses) { + this.shippingAddresses = new ArrayList<>(Arrays.asList(shippingAddresses)); + } + + public void setShippingAddresses(final java.util.List shippingAddresses) { + this.shippingAddresses = shippingAddresses; + } + + public void setDefaultShippingAddress(final Integer defaultShippingAddress) { + this.defaultShippingAddress = defaultShippingAddress; + } + + public void setBillingAddresses(final Integer... billingAddresses) { + this.billingAddresses = new ArrayList<>(Arrays.asList(billingAddresses)); + } + + public void setBillingAddresses(final java.util.List billingAddresses) { + this.billingAddresses = billingAddresses; + } + + public void setDefaultBillingAddress(final Integer defaultBillingAddress) { + this.defaultBillingAddress = defaultBillingAddress; + } + + public void setStores(final com.commercetools.importapi.models.common.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + + public void setCustom(final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitImportImpl that = (BusinessUnitImportImpl) o; + + return new EqualsBuilder().append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(unitType) + .append(key) + .append(name) + .append(status) + .append(contactEmail) + .append(associates) + .append(addresses) + .append(shippingAddresses) + .append(defaultShippingAddress) + .append(billingAddresses) + .append(defaultBillingAddress) + .append(stores) + .append(custom) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("unitType", unitType) + .append("key", key) + .append("name", name) + .append("status", status) + .append("contactEmail", contactEmail) + .append("associates", associates) + .append("addresses", addresses) + .append("shippingAddresses", shippingAddresses) + .append("defaultShippingAddress", defaultShippingAddress) + .append("billingAddresses", billingAddresses) + .append("defaultBillingAddress", defaultBillingAddress) + .append("stores", stores) + .append("custom", custom) + .build(); + } + + @Override + public BusinessUnitImport copyDeep() { + return BusinessUnitImport.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitStatus.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitStatus.java new file mode 100644 index 00000000000..6d50d4516e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/BusinessUnitStatus.java @@ -0,0 +1,112 @@ + +package com.commercetools.importapi.models.business_units; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Indicates whether the Business Unit can be used.

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

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

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

Stores are defined on the Business Unit.

*/ + BusinessUnitStoreMode EXPLICIT = BusinessUnitStoreModeEnum.EXPLICIT; + /** +

Stores are inherited from the closest parent in the hierarchy that has Stores defined.

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

Defines the type of the Business Unit.

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

Represents a Company, the top-level of a business.

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

+ *     CompanyBusinessUnitImport companyBusinessUnitImport = CompanyBusinessUnitImport.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("Company") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CompanyBusinessUnitImportImpl.class) +public interface CompanyBusinessUnitImport extends BusinessUnitImport { + + /** + * discriminator value for CompanyBusinessUnitImport + */ + String COMPANY = "Company"; + + /** + * + * @return storeMode + */ + + @JsonProperty("storeMode") + public BusinessUnitStoreMode getStoreMode(); + + /** + * set storeMode + * @param storeMode value to be set + */ + + public void setStoreMode(final BusinessUnitStoreMode storeMode); + + /** + * factory method + * @return instance of CompanyBusinessUnitImport + */ + public static CompanyBusinessUnitImport of() { + return new CompanyBusinessUnitImportImpl(); + } + + /** + * factory method to create a shallow copy CompanyBusinessUnitImport + * @param template instance to be copied + * @return copy instance + */ + public static CompanyBusinessUnitImport of(final CompanyBusinessUnitImport template) { + CompanyBusinessUnitImportImpl instance = new CompanyBusinessUnitImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setStatus(template.getStatus()); + instance.setContactEmail(template.getContactEmail()); + instance.setAssociates(template.getAssociates()); + instance.setAddresses(template.getAddresses()); + instance.setShippingAddresses(template.getShippingAddresses()); + instance.setDefaultShippingAddress(template.getDefaultShippingAddress()); + instance.setBillingAddresses(template.getBillingAddresses()); + instance.setDefaultBillingAddress(template.getDefaultBillingAddress()); + instance.setStores(template.getStores()); + instance.setCustom(template.getCustom()); + instance.setStoreMode(template.getStoreMode()); + return instance; + } + + public CompanyBusinessUnitImport copyDeep(); + + /** + * factory method to create a deep copy of CompanyBusinessUnitImport + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CompanyBusinessUnitImport deepCopy(@Nullable final CompanyBusinessUnitImport template) { + if (template == null) { + return null; + } + CompanyBusinessUnitImportImpl instance = new CompanyBusinessUnitImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setStatus(template.getStatus()); + instance.setContactEmail(template.getContactEmail()); + instance.setAssociates(Optional.ofNullable(template.getAssociates()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.business_units.AssociateDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAddresses(Optional.ofNullable(template.getAddresses()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.Address::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setShippingAddresses( + Optional.ofNullable(template.getShippingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultShippingAddress(template.getDefaultShippingAddress()); + instance.setBillingAddresses( + Optional.ofNullable(template.getBillingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultBillingAddress(template.getDefaultBillingAddress()); + instance.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustom(com.commercetools.importapi.models.customfields.Custom.deepCopy(template.getCustom())); + instance.setStoreMode(template.getStoreMode()); + return instance; + } + + /** + * builder factory method for CompanyBusinessUnitImport + * @return builder + */ + public static CompanyBusinessUnitImportBuilder builder() { + return CompanyBusinessUnitImportBuilder.of(); + } + + /** + * create builder for CompanyBusinessUnitImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CompanyBusinessUnitImportBuilder builder(final CompanyBusinessUnitImport template) { + return CompanyBusinessUnitImportBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCompanyBusinessUnitImport(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportBuilder.java new file mode 100644 index 00000000000..545fe7ddfe5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportBuilder.java @@ -0,0 +1,704 @@ + +package com.commercetools.importapi.models.business_units; + +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; + +/** + * CompanyBusinessUnitImportBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CompanyBusinessUnitImport companyBusinessUnitImport = CompanyBusinessUnitImport.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CompanyBusinessUnitImportBuilder implements Builder { + + private String key; + + private String name; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitStatus status; + + @Nullable + private String contactEmail; + + @Nullable + private java.util.List associates; + + @Nullable + private java.util.List addresses; + + @Nullable + private java.util.List shippingAddresses; + + @Nullable + private Integer defaultShippingAddress; + + @Nullable + private java.util.List billingAddresses; + + @Nullable + private Integer defaultBillingAddress; + + @Nullable + private java.util.List stores; + + @Nullable + private com.commercetools.importapi.models.customfields.Custom custom; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode; + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ * @param status value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder status( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitStatus status) { + this.status = status; + return this; + } + + /** + *

The contact email address for the Business Unit.

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

List of Associates to be assigned to the Business Unit.

+ * @param associates value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder associates( + @Nullable final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + this.associates = new ArrayList<>(Arrays.asList(associates)); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

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

List of Associates to be assigned to the Business Unit.

+ * @param associates value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusAssociates( + @Nullable final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + if (this.associates == null) { + this.associates = new ArrayList<>(); + } + this.associates.addAll(Arrays.asList(associates)); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusAssociates( + Function builder) { + if (this.associates == null) { + this.associates = new ArrayList<>(); + } + this.associates.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of()).build()); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder withAssociates( + Function builder) { + this.associates = new ArrayList<>(); + this.associates.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of()).build()); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder addAssociates( + Function builder) { + return plusAssociates( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of())); + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder setAssociates( + Function builder) { + return associates(builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of())); + } + + /** + *

The addresses for the Business Unit.

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

The addresses for the Business Unit.

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

The addresses for the Business Unit.

+ * @param addresses value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusAddresses( + @Nullable final com.commercetools.importapi.models.common.Address... addresses) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.addAll(Arrays.asList(addresses)); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusAddresses( + Function builder) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.add(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of()).build()); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder withAddresses( + Function builder) { + this.addresses = new ArrayList<>(); + this.addresses.add(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of()).build()); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder addAddresses( + Function builder) { + return plusAddresses(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of())); + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder setAddresses( + Function builder) { + return addresses(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of())); + } + + /** + *

The indices of the shipping addresses in the addresses array.

+ * @param shippingAddresses value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder shippingAddresses(@Nullable final Integer... shippingAddresses) { + this.shippingAddresses = new ArrayList<>(Arrays.asList(shippingAddresses)); + return this; + } + + /** + *

The indices of the shipping addresses in the addresses array.

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

The indices of the shipping addresses in the addresses array.

+ * @param shippingAddresses value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusShippingAddresses(@Nullable final Integer... shippingAddresses) { + if (this.shippingAddresses == null) { + this.shippingAddresses = new ArrayList<>(); + } + this.shippingAddresses.addAll(Arrays.asList(shippingAddresses)); + return this; + } + + /** + *

The index of the default shipping address in the addresses array.

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

The indices of the billing addresses in the addresses array.

+ * @param billingAddresses value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder billingAddresses(@Nullable final Integer... billingAddresses) { + this.billingAddresses = new ArrayList<>(Arrays.asList(billingAddresses)); + return this; + } + + /** + *

The indices of the billing addresses in the addresses array.

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

The indices of the billing addresses in the addresses array.

+ * @param billingAddresses value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusBillingAddresses(@Nullable final Integer... billingAddresses) { + if (this.billingAddresses == null) { + this.billingAddresses = new ArrayList<>(); + } + this.billingAddresses.addAll(Arrays.asList(billingAddresses)); + return this; + } + + /** + *

The index of the default billing address in the addresses array.

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

The Stores of the Business Unit.

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

The Stores of the Business Unit.

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

The Stores of the Business Unit.

+ * @param stores value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusStores( + @Nullable final com.commercetools.importapi.models.common.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder plusStores( + Function builder) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.add(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder withStores( + Function builder) { + this.stores = new ArrayList<>(); + this.stores.add(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder addStores( + Function builder) { + return plusStores(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of())); + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder setStores( + Function builder) { + return stores(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of())); + } + + /** + *

Custom fields for the Business Unit.

+ * @param builder function to build the custom value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()).build(); + return this; + } + + /** + *

Custom fields for the Business Unit.

+ * @param builder function to build the custom value + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()); + return this; + } + + /** + *

Custom fields for the Business Unit.

+ * @param custom value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder custom( + @Nullable final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + return this; + } + + /** + * set the value to the storeMode + * @param storeMode value to be set + * @return Builder + */ + + public CompanyBusinessUnitImportBuilder storeMode( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode) { + this.storeMode = storeMode; + return this; + } + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ * @return status + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitStatus getStatus() { + return this.status; + } + + /** + *

The contact email address for the Business Unit.

+ * @return contactEmail + */ + + @Nullable + public String getContactEmail() { + return this.contactEmail; + } + + /** + *

List of Associates to be assigned to the Business Unit.

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

The addresses for the Business Unit.

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

The indices of the shipping addresses in the addresses array.

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

The index of the default shipping address in the addresses array.

+ * @return defaultShippingAddress + */ + + @Nullable + public Integer getDefaultShippingAddress() { + return this.defaultShippingAddress; + } + + /** + *

The indices of the billing addresses in the addresses array.

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

The index of the default billing address in the addresses array.

+ * @return defaultBillingAddress + */ + + @Nullable + public Integer getDefaultBillingAddress() { + return this.defaultBillingAddress; + } + + /** + *

The Stores of the Business Unit.

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

Custom fields for the Business Unit.

+ * @return custom + */ + + @Nullable + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + /** + * value of storeMode} + * @return storeMode + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitStoreMode getStoreMode() { + return this.storeMode; + } + + /** + * builds CompanyBusinessUnitImport with checking for non-null required values + * @return CompanyBusinessUnitImport + */ + public CompanyBusinessUnitImport build() { + Objects.requireNonNull(key, CompanyBusinessUnitImport.class + ": key is missing"); + Objects.requireNonNull(name, CompanyBusinessUnitImport.class + ": name is missing"); + return new CompanyBusinessUnitImportImpl(key, name, status, contactEmail, associates, addresses, + shippingAddresses, defaultShippingAddress, billingAddresses, defaultBillingAddress, stores, custom, + storeMode); + } + + /** + * builds CompanyBusinessUnitImport without checking for non-null required values + * @return CompanyBusinessUnitImport + */ + public CompanyBusinessUnitImport buildUnchecked() { + return new CompanyBusinessUnitImportImpl(key, name, status, contactEmail, associates, addresses, + shippingAddresses, defaultShippingAddress, billingAddresses, defaultBillingAddress, stores, custom, + storeMode); + } + + /** + * factory method for an instance of CompanyBusinessUnitImportBuilder + * @return builder + */ + public static CompanyBusinessUnitImportBuilder of() { + return new CompanyBusinessUnitImportBuilder(); + } + + /** + * create builder for CompanyBusinessUnitImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CompanyBusinessUnitImportBuilder of(final CompanyBusinessUnitImport template) { + CompanyBusinessUnitImportBuilder builder = new CompanyBusinessUnitImportBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.status = template.getStatus(); + builder.contactEmail = template.getContactEmail(); + builder.associates = template.getAssociates(); + builder.addresses = template.getAddresses(); + builder.shippingAddresses = template.getShippingAddresses(); + builder.defaultShippingAddress = template.getDefaultShippingAddress(); + builder.billingAddresses = template.getBillingAddresses(); + builder.defaultBillingAddress = template.getDefaultBillingAddress(); + builder.stores = template.getStores(); + builder.custom = template.getCustom(); + builder.storeMode = template.getStoreMode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportImpl.java new file mode 100644 index 00000000000..733767fe950 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportImpl.java @@ -0,0 +1,360 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Represents a Company, the top-level of a business.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CompanyBusinessUnitImportImpl implements CompanyBusinessUnitImport, ModelBase { + + private com.commercetools.importapi.models.business_units.BusinessUnitType unitType; + + private String key; + + private String name; + + private com.commercetools.importapi.models.business_units.BusinessUnitStatus status; + + private String contactEmail; + + private java.util.List associates; + + private java.util.List addresses; + + private java.util.List shippingAddresses; + + private Integer defaultShippingAddress; + + private java.util.List billingAddresses; + + private Integer defaultBillingAddress; + + private java.util.List stores; + + private com.commercetools.importapi.models.customfields.Custom custom; + + private com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode; + + /** + * create instance with all properties + */ + @JsonCreator + CompanyBusinessUnitImportImpl(@JsonProperty("key") final String key, @JsonProperty("name") final String name, + @JsonProperty("status") final com.commercetools.importapi.models.business_units.BusinessUnitStatus status, + @JsonProperty("contactEmail") final String contactEmail, + @JsonProperty("associates") final java.util.List associates, + @JsonProperty("addresses") final java.util.List addresses, + @JsonProperty("shippingAddresses") final java.util.List shippingAddresses, + @JsonProperty("defaultShippingAddress") final Integer defaultShippingAddress, + @JsonProperty("billingAddresses") final java.util.List billingAddresses, + @JsonProperty("defaultBillingAddress") final Integer defaultBillingAddress, + @JsonProperty("stores") final java.util.List stores, + @JsonProperty("custom") final com.commercetools.importapi.models.customfields.Custom custom, + @JsonProperty("storeMode") final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode) { + this.key = key; + this.name = name; + this.status = status; + this.contactEmail = contactEmail; + this.associates = associates; + this.addresses = addresses; + this.shippingAddresses = shippingAddresses; + this.defaultShippingAddress = defaultShippingAddress; + this.billingAddresses = billingAddresses; + this.defaultBillingAddress = defaultBillingAddress; + this.stores = stores; + this.custom = custom; + this.storeMode = storeMode; + this.unitType = BusinessUnitType.findEnum("Company"); + } + + /** + * create empty instance + */ + public CompanyBusinessUnitImportImpl() { + this.unitType = BusinessUnitType.findEnum("Company"); + } + + /** + *

The type of Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitType getUnitType() { + return this.unitType; + } + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitStatus getStatus() { + return this.status; + } + + /** + *

The contact email address for the Business Unit.

+ */ + + public String getContactEmail() { + return this.contactEmail; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ */ + + public java.util.List getAssociates() { + return this.associates; + } + + /** + *

The addresses for the Business Unit.

+ */ + + public java.util.List getAddresses() { + return this.addresses; + } + + /** + *

The indices of the shipping addresses in the addresses array.

+ */ + + public java.util.List getShippingAddresses() { + return this.shippingAddresses; + } + + /** + *

The index of the default shipping address in the addresses array.

+ */ + + public Integer getDefaultShippingAddress() { + return this.defaultShippingAddress; + } + + /** + *

The indices of the billing addresses in the addresses array.

+ */ + + public java.util.List getBillingAddresses() { + return this.billingAddresses; + } + + /** + *

The index of the default billing address in the addresses array.

+ */ + + public Integer getDefaultBillingAddress() { + return this.defaultBillingAddress; + } + + /** + *

The Stores of the Business Unit.

+ */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

Custom fields for the Business Unit.

+ */ + + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + /** + * + */ + + public com.commercetools.importapi.models.business_units.BusinessUnitStoreMode getStoreMode() { + return this.storeMode; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final String name) { + this.name = name; + } + + public void setStatus(final com.commercetools.importapi.models.business_units.BusinessUnitStatus status) { + this.status = status; + } + + public void setContactEmail(final String contactEmail) { + this.contactEmail = contactEmail; + } + + public void setAssociates(final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + this.associates = new ArrayList<>(Arrays.asList(associates)); + } + + public void setAssociates( + final java.util.List associates) { + this.associates = associates; + } + + public void setAddresses(final com.commercetools.importapi.models.common.Address... addresses) { + this.addresses = new ArrayList<>(Arrays.asList(addresses)); + } + + public void setAddresses(final java.util.List addresses) { + this.addresses = addresses; + } + + public void setShippingAddresses(final Integer... shippingAddresses) { + this.shippingAddresses = new ArrayList<>(Arrays.asList(shippingAddresses)); + } + + public void setShippingAddresses(final java.util.List shippingAddresses) { + this.shippingAddresses = shippingAddresses; + } + + public void setDefaultShippingAddress(final Integer defaultShippingAddress) { + this.defaultShippingAddress = defaultShippingAddress; + } + + public void setBillingAddresses(final Integer... billingAddresses) { + this.billingAddresses = new ArrayList<>(Arrays.asList(billingAddresses)); + } + + public void setBillingAddresses(final java.util.List billingAddresses) { + this.billingAddresses = billingAddresses; + } + + public void setDefaultBillingAddress(final Integer defaultBillingAddress) { + this.defaultBillingAddress = defaultBillingAddress; + } + + public void setStores(final com.commercetools.importapi.models.common.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + + public void setCustom(final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + } + + public void setStoreMode(final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode) { + this.storeMode = storeMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CompanyBusinessUnitImportImpl that = (CompanyBusinessUnitImportImpl) o; + + return new EqualsBuilder().append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .append(storeMode, that.storeMode) + .append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .append(storeMode, that.storeMode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(unitType) + .append(key) + .append(name) + .append(status) + .append(contactEmail) + .append(associates) + .append(addresses) + .append(shippingAddresses) + .append(defaultShippingAddress) + .append(billingAddresses) + .append(defaultBillingAddress) + .append(stores) + .append(custom) + .append(storeMode) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("unitType", unitType) + .append("key", key) + .append("name", name) + .append("status", status) + .append("contactEmail", contactEmail) + .append("associates", associates) + .append("addresses", addresses) + .append("shippingAddresses", shippingAddresses) + .append("defaultShippingAddress", defaultShippingAddress) + .append("billingAddresses", billingAddresses) + .append("defaultBillingAddress", defaultBillingAddress) + .append("stores", stores) + .append("custom", custom) + .append("storeMode", storeMode) + .build(); + } + + @Override + public CompanyBusinessUnitImport copyDeep() { + return CompanyBusinessUnitImport.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImport.java new file mode 100644 index 00000000000..99f38d6f191 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImport.java @@ -0,0 +1,226 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.importapi.models.common.BusinessUnitKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Represents a Division, a sub-unit of a Company or another Division.

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

+ *     DivisionBusinessUnitImport divisionBusinessUnitImport = DivisionBusinessUnitImport.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .parentUnit(parentUnitBuilder -> parentUnitBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("Division") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DivisionBusinessUnitImportImpl.class) +public interface DivisionBusinessUnitImport extends BusinessUnitImport { + + /** + * discriminator value for DivisionBusinessUnitImport + */ + String DIVISION = "Division"; + + /** + *

If Explicit, the stores field cannot be empty and the Business Unit is explicitly associated with the given Stores. If FromParent, the Business Unit inherits the Stores from its parent.

+ * @return storeMode + */ + + @JsonProperty("storeMode") + public BusinessUnitStoreMode getStoreMode(); + + /** + *

The parent Business Unit of this Division.

+ * @return parentUnit + */ + @NotNull + @Valid + @JsonProperty("parentUnit") + public BusinessUnitKeyReference getParentUnit(); + + /** + *

If Explicit, Associates are not inherited from the parent. If ExplicitAndFromParent, Associates are inherited from the parent.

+ * @return associateMode + */ + + @JsonProperty("associateMode") + public BusinessUnitAssociateMode getAssociateMode(); + + /** + *

If Explicit, approval rules are not inherited from the parent. If ExplicitAndFromParent, approval rules are inherited from the parent.

+ * @return approvalRuleMode + */ + + @JsonProperty("approvalRuleMode") + public BusinessUnitApprovalRuleMode getApprovalRuleMode(); + + /** + *

If Explicit, the stores field cannot be empty and the Business Unit is explicitly associated with the given Stores. If FromParent, the Business Unit inherits the Stores from its parent.

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

The parent Business Unit of this Division.

+ * @param parentUnit value to be set + */ + + public void setParentUnit(final BusinessUnitKeyReference parentUnit); + + /** + *

If Explicit, Associates are not inherited from the parent. If ExplicitAndFromParent, Associates are inherited from the parent.

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

If Explicit, approval rules are not inherited from the parent. If ExplicitAndFromParent, approval rules are inherited from the parent.

+ * @param approvalRuleMode value to be set + */ + + public void setApprovalRuleMode(final BusinessUnitApprovalRuleMode approvalRuleMode); + + /** + * factory method + * @return instance of DivisionBusinessUnitImport + */ + public static DivisionBusinessUnitImport of() { + return new DivisionBusinessUnitImportImpl(); + } + + /** + * factory method to create a shallow copy DivisionBusinessUnitImport + * @param template instance to be copied + * @return copy instance + */ + public static DivisionBusinessUnitImport of(final DivisionBusinessUnitImport template) { + DivisionBusinessUnitImportImpl instance = new DivisionBusinessUnitImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setStatus(template.getStatus()); + instance.setContactEmail(template.getContactEmail()); + instance.setAssociates(template.getAssociates()); + instance.setAddresses(template.getAddresses()); + instance.setShippingAddresses(template.getShippingAddresses()); + instance.setDefaultShippingAddress(template.getDefaultShippingAddress()); + instance.setBillingAddresses(template.getBillingAddresses()); + instance.setDefaultBillingAddress(template.getDefaultBillingAddress()); + instance.setStores(template.getStores()); + instance.setCustom(template.getCustom()); + instance.setStoreMode(template.getStoreMode()); + instance.setParentUnit(template.getParentUnit()); + instance.setAssociateMode(template.getAssociateMode()); + instance.setApprovalRuleMode(template.getApprovalRuleMode()); + return instance; + } + + public DivisionBusinessUnitImport copyDeep(); + + /** + * factory method to create a deep copy of DivisionBusinessUnitImport + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DivisionBusinessUnitImport deepCopy(@Nullable final DivisionBusinessUnitImport template) { + if (template == null) { + return null; + } + DivisionBusinessUnitImportImpl instance = new DivisionBusinessUnitImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setStatus(template.getStatus()); + instance.setContactEmail(template.getContactEmail()); + instance.setAssociates(Optional.ofNullable(template.getAssociates()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.business_units.AssociateDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAddresses(Optional.ofNullable(template.getAddresses()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.Address::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setShippingAddresses( + Optional.ofNullable(template.getShippingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultShippingAddress(template.getDefaultShippingAddress()); + instance.setBillingAddresses( + Optional.ofNullable(template.getBillingAddresses()).map(ArrayList::new).orElse(null)); + instance.setDefaultBillingAddress(template.getDefaultBillingAddress()); + instance.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustom(com.commercetools.importapi.models.customfields.Custom.deepCopy(template.getCustom())); + instance.setStoreMode(template.getStoreMode()); + instance.setParentUnit( + com.commercetools.importapi.models.common.BusinessUnitKeyReference.deepCopy(template.getParentUnit())); + instance.setAssociateMode(template.getAssociateMode()); + instance.setApprovalRuleMode(template.getApprovalRuleMode()); + return instance; + } + + /** + * builder factory method for DivisionBusinessUnitImport + * @return builder + */ + public static DivisionBusinessUnitImportBuilder builder() { + return DivisionBusinessUnitImportBuilder.of(); + } + + /** + * create builder for DivisionBusinessUnitImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DivisionBusinessUnitImportBuilder builder(final DivisionBusinessUnitImport template) { + return DivisionBusinessUnitImportBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDivisionBusinessUnitImport(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportBuilder.java new file mode 100644 index 00000000000..ff85145df5d --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportBuilder.java @@ -0,0 +1,808 @@ + +package com.commercetools.importapi.models.business_units; + +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; + +/** + * DivisionBusinessUnitImportBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DivisionBusinessUnitImport divisionBusinessUnitImport = DivisionBusinessUnitImport.builder()
+ *             .key("{key}")
+ *             .name("{name}")
+ *             .parentUnit(parentUnitBuilder -> parentUnitBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DivisionBusinessUnitImportBuilder implements Builder { + + private String key; + + private String name; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitStatus status; + + @Nullable + private String contactEmail; + + @Nullable + private java.util.List associates; + + @Nullable + private java.util.List addresses; + + @Nullable + private java.util.List shippingAddresses; + + @Nullable + private Integer defaultShippingAddress; + + @Nullable + private java.util.List billingAddresses; + + @Nullable + private Integer defaultBillingAddress; + + @Nullable + private java.util.List stores; + + @Nullable + private com.commercetools.importapi.models.customfields.Custom custom; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode; + + private com.commercetools.importapi.models.common.BusinessUnitKeyReference parentUnit; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode associateMode; + + @Nullable + private com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode approvalRuleMode; + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ * @param status value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder status( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitStatus status) { + this.status = status; + return this; + } + + /** + *

The contact email address for the Business Unit.

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

List of Associates to be assigned to the Business Unit.

+ * @param associates value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder associates( + @Nullable final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + this.associates = new ArrayList<>(Arrays.asList(associates)); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

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

List of Associates to be assigned to the Business Unit.

+ * @param associates value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusAssociates( + @Nullable final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + if (this.associates == null) { + this.associates = new ArrayList<>(); + } + this.associates.addAll(Arrays.asList(associates)); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusAssociates( + Function builder) { + if (this.associates == null) { + this.associates = new ArrayList<>(); + } + this.associates.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of()).build()); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder withAssociates( + Function builder) { + this.associates = new ArrayList<>(); + this.associates.add( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of()).build()); + return this; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder addAssociates( + Function builder) { + return plusAssociates( + builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of())); + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ * @param builder function to build the associates value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder setAssociates( + Function builder) { + return associates(builder.apply(com.commercetools.importapi.models.business_units.AssociateDraftBuilder.of())); + } + + /** + *

The addresses for the Business Unit.

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

The addresses for the Business Unit.

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

The addresses for the Business Unit.

+ * @param addresses value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusAddresses( + @Nullable final com.commercetools.importapi.models.common.Address... addresses) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.addAll(Arrays.asList(addresses)); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusAddresses( + Function builder) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.add(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of()).build()); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder withAddresses( + Function builder) { + this.addresses = new ArrayList<>(); + this.addresses.add(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of()).build()); + return this; + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder addAddresses( + Function builder) { + return plusAddresses(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of())); + } + + /** + *

The addresses for the Business Unit.

+ * @param builder function to build the addresses value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder setAddresses( + Function builder) { + return addresses(builder.apply(com.commercetools.importapi.models.common.AddressBuilder.of())); + } + + /** + *

The indices of the shipping addresses in the addresses array.

+ * @param shippingAddresses value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder shippingAddresses(@Nullable final Integer... shippingAddresses) { + this.shippingAddresses = new ArrayList<>(Arrays.asList(shippingAddresses)); + return this; + } + + /** + *

The indices of the shipping addresses in the addresses array.

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

The indices of the shipping addresses in the addresses array.

+ * @param shippingAddresses value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusShippingAddresses(@Nullable final Integer... shippingAddresses) { + if (this.shippingAddresses == null) { + this.shippingAddresses = new ArrayList<>(); + } + this.shippingAddresses.addAll(Arrays.asList(shippingAddresses)); + return this; + } + + /** + *

The index of the default shipping address in the addresses array.

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

The indices of the billing addresses in the addresses array.

+ * @param billingAddresses value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder billingAddresses(@Nullable final Integer... billingAddresses) { + this.billingAddresses = new ArrayList<>(Arrays.asList(billingAddresses)); + return this; + } + + /** + *

The indices of the billing addresses in the addresses array.

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

The indices of the billing addresses in the addresses array.

+ * @param billingAddresses value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusBillingAddresses(@Nullable final Integer... billingAddresses) { + if (this.billingAddresses == null) { + this.billingAddresses = new ArrayList<>(); + } + this.billingAddresses.addAll(Arrays.asList(billingAddresses)); + return this; + } + + /** + *

The index of the default billing address in the addresses array.

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

The Stores of the Business Unit.

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

The Stores of the Business Unit.

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

The Stores of the Business Unit.

+ * @param stores value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusStores( + @Nullable final com.commercetools.importapi.models.common.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder plusStores( + Function builder) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.add(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder withStores( + Function builder) { + this.stores = new ArrayList<>(); + this.stores.add(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder addStores( + Function builder) { + return plusStores(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of())); + } + + /** + *

The Stores of the Business Unit.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder setStores( + Function builder) { + return stores(builder.apply(com.commercetools.importapi.models.common.StoreKeyReferenceBuilder.of())); + } + + /** + *

Custom fields for the Business Unit.

+ * @param builder function to build the custom value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()).build(); + return this; + } + + /** + *

Custom fields for the Business Unit.

+ * @param builder function to build the custom value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()); + return this; + } + + /** + *

Custom fields for the Business Unit.

+ * @param custom value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder custom( + @Nullable final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + return this; + } + + /** + *

If Explicit, the stores field cannot be empty and the Business Unit is explicitly associated with the given Stores. If FromParent, the Business Unit inherits the Stores from its parent.

+ * @param storeMode value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder storeMode( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode) { + this.storeMode = storeMode; + return this; + } + + /** + *

The parent Business Unit of this Division.

+ * @param builder function to build the parentUnit value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder parentUnit( + Function builder) { + this.parentUnit = builder.apply(com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

The parent Business Unit of this Division.

+ * @param builder function to build the parentUnit value + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder withParentUnit( + Function builder) { + this.parentUnit = builder.apply(com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder.of()); + return this; + } + + /** + *

The parent Business Unit of this Division.

+ * @param parentUnit value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder parentUnit( + final com.commercetools.importapi.models.common.BusinessUnitKeyReference parentUnit) { + this.parentUnit = parentUnit; + return this; + } + + /** + *

If Explicit, Associates are not inherited from the parent. If ExplicitAndFromParent, Associates are inherited from the parent.

+ * @param associateMode value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder associateMode( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode associateMode) { + this.associateMode = associateMode; + return this; + } + + /** + *

If Explicit, approval rules are not inherited from the parent. If ExplicitAndFromParent, approval rules are inherited from the parent.

+ * @param approvalRuleMode value to be set + * @return Builder + */ + + public DivisionBusinessUnitImportBuilder approvalRuleMode( + @Nullable final com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode approvalRuleMode) { + this.approvalRuleMode = approvalRuleMode; + return this; + } + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ * @return status + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitStatus getStatus() { + return this.status; + } + + /** + *

The contact email address for the Business Unit.

+ * @return contactEmail + */ + + @Nullable + public String getContactEmail() { + return this.contactEmail; + } + + /** + *

List of Associates to be assigned to the Business Unit.

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

The addresses for the Business Unit.

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

The indices of the shipping addresses in the addresses array.

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

The index of the default shipping address in the addresses array.

+ * @return defaultShippingAddress + */ + + @Nullable + public Integer getDefaultShippingAddress() { + return this.defaultShippingAddress; + } + + /** + *

The indices of the billing addresses in the addresses array.

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

The index of the default billing address in the addresses array.

+ * @return defaultBillingAddress + */ + + @Nullable + public Integer getDefaultBillingAddress() { + return this.defaultBillingAddress; + } + + /** + *

The Stores of the Business Unit.

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

Custom fields for the Business Unit.

+ * @return custom + */ + + @Nullable + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + /** + *

If Explicit, the stores field cannot be empty and the Business Unit is explicitly associated with the given Stores. If FromParent, the Business Unit inherits the Stores from its parent.

+ * @return storeMode + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitStoreMode getStoreMode() { + return this.storeMode; + } + + /** + *

The parent Business Unit of this Division.

+ * @return parentUnit + */ + + public com.commercetools.importapi.models.common.BusinessUnitKeyReference getParentUnit() { + return this.parentUnit; + } + + /** + *

If Explicit, Associates are not inherited from the parent. If ExplicitAndFromParent, Associates are inherited from the parent.

+ * @return associateMode + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode getAssociateMode() { + return this.associateMode; + } + + /** + *

If Explicit, approval rules are not inherited from the parent. If ExplicitAndFromParent, approval rules are inherited from the parent.

+ * @return approvalRuleMode + */ + + @Nullable + public com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode getApprovalRuleMode() { + return this.approvalRuleMode; + } + + /** + * builds DivisionBusinessUnitImport with checking for non-null required values + * @return DivisionBusinessUnitImport + */ + public DivisionBusinessUnitImport build() { + Objects.requireNonNull(key, DivisionBusinessUnitImport.class + ": key is missing"); + Objects.requireNonNull(name, DivisionBusinessUnitImport.class + ": name is missing"); + Objects.requireNonNull(parentUnit, DivisionBusinessUnitImport.class + ": parentUnit is missing"); + return new DivisionBusinessUnitImportImpl(key, name, status, contactEmail, associates, addresses, + shippingAddresses, defaultShippingAddress, billingAddresses, defaultBillingAddress, stores, custom, + storeMode, parentUnit, associateMode, approvalRuleMode); + } + + /** + * builds DivisionBusinessUnitImport without checking for non-null required values + * @return DivisionBusinessUnitImport + */ + public DivisionBusinessUnitImport buildUnchecked() { + return new DivisionBusinessUnitImportImpl(key, name, status, contactEmail, associates, addresses, + shippingAddresses, defaultShippingAddress, billingAddresses, defaultBillingAddress, stores, custom, + storeMode, parentUnit, associateMode, approvalRuleMode); + } + + /** + * factory method for an instance of DivisionBusinessUnitImportBuilder + * @return builder + */ + public static DivisionBusinessUnitImportBuilder of() { + return new DivisionBusinessUnitImportBuilder(); + } + + /** + * create builder for DivisionBusinessUnitImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DivisionBusinessUnitImportBuilder of(final DivisionBusinessUnitImport template) { + DivisionBusinessUnitImportBuilder builder = new DivisionBusinessUnitImportBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.status = template.getStatus(); + builder.contactEmail = template.getContactEmail(); + builder.associates = template.getAssociates(); + builder.addresses = template.getAddresses(); + builder.shippingAddresses = template.getShippingAddresses(); + builder.defaultShippingAddress = template.getDefaultShippingAddress(); + builder.billingAddresses = template.getBillingAddresses(); + builder.defaultBillingAddress = template.getDefaultBillingAddress(); + builder.stores = template.getStores(); + builder.custom = template.getCustom(); + builder.storeMode = template.getStoreMode(); + builder.parentUnit = template.getParentUnit(); + builder.associateMode = template.getAssociateMode(); + builder.approvalRuleMode = template.getApprovalRuleMode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportImpl.java new file mode 100644 index 00000000000..5e11bf47eab --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportImpl.java @@ -0,0 +1,422 @@ + +package com.commercetools.importapi.models.business_units; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Represents a Division, a sub-unit of a Company or another Division.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DivisionBusinessUnitImportImpl implements DivisionBusinessUnitImport, ModelBase { + + private com.commercetools.importapi.models.business_units.BusinessUnitType unitType; + + private String key; + + private String name; + + private com.commercetools.importapi.models.business_units.BusinessUnitStatus status; + + private String contactEmail; + + private java.util.List associates; + + private java.util.List addresses; + + private java.util.List shippingAddresses; + + private Integer defaultShippingAddress; + + private java.util.List billingAddresses; + + private Integer defaultBillingAddress; + + private java.util.List stores; + + private com.commercetools.importapi.models.customfields.Custom custom; + + private com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode; + + private com.commercetools.importapi.models.common.BusinessUnitKeyReference parentUnit; + + private com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode associateMode; + + private com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode approvalRuleMode; + + /** + * create instance with all properties + */ + @JsonCreator + DivisionBusinessUnitImportImpl(@JsonProperty("key") final String key, @JsonProperty("name") final String name, + @JsonProperty("status") final com.commercetools.importapi.models.business_units.BusinessUnitStatus status, + @JsonProperty("contactEmail") final String contactEmail, + @JsonProperty("associates") final java.util.List associates, + @JsonProperty("addresses") final java.util.List addresses, + @JsonProperty("shippingAddresses") final java.util.List shippingAddresses, + @JsonProperty("defaultShippingAddress") final Integer defaultShippingAddress, + @JsonProperty("billingAddresses") final java.util.List billingAddresses, + @JsonProperty("defaultBillingAddress") final Integer defaultBillingAddress, + @JsonProperty("stores") final java.util.List stores, + @JsonProperty("custom") final com.commercetools.importapi.models.customfields.Custom custom, + @JsonProperty("storeMode") final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode, + @JsonProperty("parentUnit") final com.commercetools.importapi.models.common.BusinessUnitKeyReference parentUnit, + @JsonProperty("associateMode") final com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode associateMode, + @JsonProperty("approvalRuleMode") final com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode approvalRuleMode) { + this.key = key; + this.name = name; + this.status = status; + this.contactEmail = contactEmail; + this.associates = associates; + this.addresses = addresses; + this.shippingAddresses = shippingAddresses; + this.defaultShippingAddress = defaultShippingAddress; + this.billingAddresses = billingAddresses; + this.defaultBillingAddress = defaultBillingAddress; + this.stores = stores; + this.custom = custom; + this.storeMode = storeMode; + this.parentUnit = parentUnit; + this.associateMode = associateMode; + this.approvalRuleMode = approvalRuleMode; + this.unitType = BusinessUnitType.findEnum("Division"); + } + + /** + * create empty instance + */ + public DivisionBusinessUnitImportImpl() { + this.unitType = BusinessUnitType.findEnum("Division"); + } + + /** + *

The type of Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitType getUnitType() { + return this.unitType; + } + + /** + *

User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

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

The name of the Business Unit.

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

The status of the Business Unit.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitStatus getStatus() { + return this.status; + } + + /** + *

The contact email address for the Business Unit.

+ */ + + public String getContactEmail() { + return this.contactEmail; + } + + /** + *

List of Associates to be assigned to the Business Unit.

+ */ + + public java.util.List getAssociates() { + return this.associates; + } + + /** + *

The addresses for the Business Unit.

+ */ + + public java.util.List getAddresses() { + return this.addresses; + } + + /** + *

The indices of the shipping addresses in the addresses array.

+ */ + + public java.util.List getShippingAddresses() { + return this.shippingAddresses; + } + + /** + *

The index of the default shipping address in the addresses array.

+ */ + + public Integer getDefaultShippingAddress() { + return this.defaultShippingAddress; + } + + /** + *

The indices of the billing addresses in the addresses array.

+ */ + + public java.util.List getBillingAddresses() { + return this.billingAddresses; + } + + /** + *

The index of the default billing address in the addresses array.

+ */ + + public Integer getDefaultBillingAddress() { + return this.defaultBillingAddress; + } + + /** + *

The Stores of the Business Unit.

+ */ + + public java.util.List getStores() { + return this.stores; + } + + /** + *

Custom fields for the Business Unit.

+ */ + + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + /** + *

If Explicit, the stores field cannot be empty and the Business Unit is explicitly associated with the given Stores. If FromParent, the Business Unit inherits the Stores from its parent.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitStoreMode getStoreMode() { + return this.storeMode; + } + + /** + *

The parent Business Unit of this Division.

+ */ + + public com.commercetools.importapi.models.common.BusinessUnitKeyReference getParentUnit() { + return this.parentUnit; + } + + /** + *

If Explicit, Associates are not inherited from the parent. If ExplicitAndFromParent, Associates are inherited from the parent.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode getAssociateMode() { + return this.associateMode; + } + + /** + *

If Explicit, approval rules are not inherited from the parent. If ExplicitAndFromParent, approval rules are inherited from the parent.

+ */ + + public com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode getApprovalRuleMode() { + return this.approvalRuleMode; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final String name) { + this.name = name; + } + + public void setStatus(final com.commercetools.importapi.models.business_units.BusinessUnitStatus status) { + this.status = status; + } + + public void setContactEmail(final String contactEmail) { + this.contactEmail = contactEmail; + } + + public void setAssociates(final com.commercetools.importapi.models.business_units.AssociateDraft... associates) { + this.associates = new ArrayList<>(Arrays.asList(associates)); + } + + public void setAssociates( + final java.util.List associates) { + this.associates = associates; + } + + public void setAddresses(final com.commercetools.importapi.models.common.Address... addresses) { + this.addresses = new ArrayList<>(Arrays.asList(addresses)); + } + + public void setAddresses(final java.util.List addresses) { + this.addresses = addresses; + } + + public void setShippingAddresses(final Integer... shippingAddresses) { + this.shippingAddresses = new ArrayList<>(Arrays.asList(shippingAddresses)); + } + + public void setShippingAddresses(final java.util.List shippingAddresses) { + this.shippingAddresses = shippingAddresses; + } + + public void setDefaultShippingAddress(final Integer defaultShippingAddress) { + this.defaultShippingAddress = defaultShippingAddress; + } + + public void setBillingAddresses(final Integer... billingAddresses) { + this.billingAddresses = new ArrayList<>(Arrays.asList(billingAddresses)); + } + + public void setBillingAddresses(final java.util.List billingAddresses) { + this.billingAddresses = billingAddresses; + } + + public void setDefaultBillingAddress(final Integer defaultBillingAddress) { + this.defaultBillingAddress = defaultBillingAddress; + } + + public void setStores(final com.commercetools.importapi.models.common.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + + public void setCustom(final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + } + + public void setStoreMode(final com.commercetools.importapi.models.business_units.BusinessUnitStoreMode storeMode) { + this.storeMode = storeMode; + } + + public void setParentUnit(final com.commercetools.importapi.models.common.BusinessUnitKeyReference parentUnit) { + this.parentUnit = parentUnit; + } + + public void setAssociateMode( + final com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode associateMode) { + this.associateMode = associateMode; + } + + public void setApprovalRuleMode( + final com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode approvalRuleMode) { + this.approvalRuleMode = approvalRuleMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DivisionBusinessUnitImportImpl that = (DivisionBusinessUnitImportImpl) o; + + return new EqualsBuilder().append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .append(storeMode, that.storeMode) + .append(parentUnit, that.parentUnit) + .append(associateMode, that.associateMode) + .append(approvalRuleMode, that.approvalRuleMode) + .append(unitType, that.unitType) + .append(key, that.key) + .append(name, that.name) + .append(status, that.status) + .append(contactEmail, that.contactEmail) + .append(associates, that.associates) + .append(addresses, that.addresses) + .append(shippingAddresses, that.shippingAddresses) + .append(defaultShippingAddress, that.defaultShippingAddress) + .append(billingAddresses, that.billingAddresses) + .append(defaultBillingAddress, that.defaultBillingAddress) + .append(stores, that.stores) + .append(custom, that.custom) + .append(storeMode, that.storeMode) + .append(parentUnit, that.parentUnit) + .append(associateMode, that.associateMode) + .append(approvalRuleMode, that.approvalRuleMode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(unitType) + .append(key) + .append(name) + .append(status) + .append(contactEmail) + .append(associates) + .append(addresses) + .append(shippingAddresses) + .append(defaultShippingAddress) + .append(billingAddresses) + .append(defaultBillingAddress) + .append(stores) + .append(custom) + .append(storeMode) + .append(parentUnit) + .append(associateMode) + .append(approvalRuleMode) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("unitType", unitType) + .append("key", key) + .append("name", name) + .append("status", status) + .append("contactEmail", contactEmail) + .append("associates", associates) + .append("addresses", addresses) + .append("shippingAddresses", shippingAddresses) + .append("defaultShippingAddress", defaultShippingAddress) + .append("billingAddresses", billingAddresses) + .append("defaultBillingAddress", defaultBillingAddress) + .append("stores", stores) + .append("custom", custom) + .append("storeMode", storeMode) + .append("parentUnit", parentUnit) + .append("associateMode", associateMode) + .append("approvalRuleMode", approvalRuleMode) + .build(); + } + + @Override + public DivisionBusinessUnitImport copyDeep() { + return DivisionBusinessUnitImport.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReference.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReference.java new file mode 100644 index 00000000000..a11ca52c44d --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.importapi.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

References an Associate Role by its key.

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

+ *     AssociateRoleKeyReference associateRoleKeyReference = AssociateRoleKeyReference.builder()
+ *             .key("{key}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("associate-role") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateRoleKeyReferenceImpl.class) +public interface AssociateRoleKeyReference extends KeyReference { + + /** + * discriminator value for AssociateRoleKeyReference + */ + String ASSOCIATE_ROLE = "associate-role"; + + /** + *

User-defined unique identifier of the referenced Type.

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

User-defined unique identifier of the referenced Type.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of AssociateRoleKeyReference + */ + public static AssociateRoleKeyReference of() { + return new AssociateRoleKeyReferenceImpl(); + } + + /** + * factory method to create a shallow copy AssociateRoleKeyReference + * @param template instance to be copied + * @return copy instance + */ + public static AssociateRoleKeyReference of(final AssociateRoleKeyReference template) { + AssociateRoleKeyReferenceImpl instance = new AssociateRoleKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public AssociateRoleKeyReference copyDeep(); + + /** + * factory method to create a deep copy of AssociateRoleKeyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AssociateRoleKeyReference deepCopy(@Nullable final AssociateRoleKeyReference template) { + if (template == null) { + return null; + } + AssociateRoleKeyReferenceImpl instance = new AssociateRoleKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for AssociateRoleKeyReference + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder builder() { + return AssociateRoleKeyReferenceBuilder.of(); + } + + /** + * create builder for AssociateRoleKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder builder(final AssociateRoleKeyReference template) { + return AssociateRoleKeyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociateRoleKeyReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceBuilder.java new file mode 100644 index 00000000000..27cf95d78d1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.importapi.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateRoleKeyReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

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

User-defined unique identifier of the referenced Type.

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

User-defined unique identifier of the referenced Type.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * builds AssociateRoleKeyReference with checking for non-null required values + * @return AssociateRoleKeyReference + */ + public AssociateRoleKeyReference build() { + Objects.requireNonNull(key, AssociateRoleKeyReference.class + ": key is missing"); + return new AssociateRoleKeyReferenceImpl(key); + } + + /** + * builds AssociateRoleKeyReference without checking for non-null required values + * @return AssociateRoleKeyReference + */ + public AssociateRoleKeyReference buildUnchecked() { + return new AssociateRoleKeyReferenceImpl(key); + } + + /** + * factory method for an instance of AssociateRoleKeyReferenceBuilder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder of() { + return new AssociateRoleKeyReferenceBuilder(); + } + + /** + * create builder for AssociateRoleKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder of(final AssociateRoleKeyReference template) { + AssociateRoleKeyReferenceBuilder builder = new AssociateRoleKeyReferenceBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceImpl.java new file mode 100644 index 00000000000..18a2fe011b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.importapi.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

References an Associate Role by its key.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleKeyReferenceImpl implements AssociateRoleKeyReference, ModelBase { + + private String key; + + private com.commercetools.importapi.models.common.ReferenceType typeId; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateRoleKeyReferenceImpl(@JsonProperty("key") final String key) { + this.key = key; + this.typeId = ReferenceType.findEnum("associate-role"); + } + + /** + * create empty instance + */ + public AssociateRoleKeyReferenceImpl() { + this.typeId = ReferenceType.findEnum("associate-role"); + } + + /** + *

User-defined unique identifier of the referenced Type.

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

Type of referenced resource.

+ */ + + public com.commercetools.importapi.models.common.ReferenceType getTypeId() { + return this.typeId; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AssociateRoleKeyReferenceImpl that = (AssociateRoleKeyReferenceImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(typeId, that.typeId) + .append(key, that.key) + .append(typeId, that.typeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key).append(typeId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("typeId", typeId) + .build(); + } + + @Override + public AssociateRoleKeyReference copyDeep() { + return AssociateRoleKeyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReference.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReference.java new file mode 100644 index 00000000000..298945022fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.importapi.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

References a business unit by its key.

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

+ *     BusinessUnitKeyReference businessUnitKeyReference = BusinessUnitKeyReference.builder()
+ *             .key("{key}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("business-unit") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BusinessUnitKeyReferenceImpl.class) +public interface BusinessUnitKeyReference extends KeyReference { + + /** + * discriminator value for BusinessUnitKeyReference + */ + String BUSINESS_UNIT = "business-unit"; + + /** + *

User-defined unique identifier of the referenced Type.

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

User-defined unique identifier of the referenced Type.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of BusinessUnitKeyReference + */ + public static BusinessUnitKeyReference of() { + return new BusinessUnitKeyReferenceImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitKeyReference + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitKeyReference of(final BusinessUnitKeyReference template) { + BusinessUnitKeyReferenceImpl instance = new BusinessUnitKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public BusinessUnitKeyReference copyDeep(); + + /** + * factory method to create a deep copy of BusinessUnitKeyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitKeyReference deepCopy(@Nullable final BusinessUnitKeyReference template) { + if (template == null) { + return null; + } + BusinessUnitKeyReferenceImpl instance = new BusinessUnitKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for BusinessUnitKeyReference + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder builder() { + return BusinessUnitKeyReferenceBuilder.of(); + } + + /** + * create builder for BusinessUnitKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder builder(final BusinessUnitKeyReference template) { + return BusinessUnitKeyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBusinessUnitKeyReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceBuilder.java new file mode 100644 index 00000000000..85a4fb18e47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.importapi.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitKeyReferenceBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

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

User-defined unique identifier of the referenced Type.

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

User-defined unique identifier of the referenced Type.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * builds BusinessUnitKeyReference with checking for non-null required values + * @return BusinessUnitKeyReference + */ + public BusinessUnitKeyReference build() { + Objects.requireNonNull(key, BusinessUnitKeyReference.class + ": key is missing"); + return new BusinessUnitKeyReferenceImpl(key); + } + + /** + * builds BusinessUnitKeyReference without checking for non-null required values + * @return BusinessUnitKeyReference + */ + public BusinessUnitKeyReference buildUnchecked() { + return new BusinessUnitKeyReferenceImpl(key); + } + + /** + * factory method for an instance of BusinessUnitKeyReferenceBuilder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder of() { + return new BusinessUnitKeyReferenceBuilder(); + } + + /** + * create builder for BusinessUnitKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder of(final BusinessUnitKeyReference template) { + BusinessUnitKeyReferenceBuilder builder = new BusinessUnitKeyReferenceBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceImpl.java new file mode 100644 index 00000000000..92a5b36294a --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.importapi.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

References a business unit by its key.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitKeyReferenceImpl implements BusinessUnitKeyReference, ModelBase { + + private String key; + + private com.commercetools.importapi.models.common.ReferenceType typeId; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitKeyReferenceImpl(@JsonProperty("key") final String key) { + this.key = key; + this.typeId = ReferenceType.findEnum("business-unit"); + } + + /** + * create empty instance + */ + public BusinessUnitKeyReferenceImpl() { + this.typeId = ReferenceType.findEnum("business-unit"); + } + + /** + *

User-defined unique identifier of the referenced Type.

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

Type of referenced resource.

+ */ + + public com.commercetools.importapi.models.common.ReferenceType getTypeId() { + return this.typeId; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitKeyReferenceImpl that = (BusinessUnitKeyReferenceImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(typeId, that.typeId) + .append(key, that.key) + .append(typeId, that.typeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key).append(typeId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("typeId", typeId) + .build(); + } + + @Override + public BusinessUnitKeyReference copyDeep() { + return BusinessUnitKeyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java index 0b296a8f9d8..33a4f23da41 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java @@ -11,11 +11,14 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

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

The Business Unit import resource type.

*/ + ImportResourceType BUSINESS_UNIT = ImportResourceTypeEnum.BUSINESS_UNIT; /**

The Category import resource type.

*/ ImportResourceType CATEGORY = ImportResourceTypeEnum.CATEGORY; @@ -66,6 +69,11 @@ public interface ImportResourceType extends JsonEnum { * possible values of ImportResourceType */ enum ImportResourceTypeEnum implements ImportResourceType { + /** + * business-unit + */ + BUSINESS_UNIT("business-unit"), + /** * category */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReference.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReference.java index dddecb37016..92c6c20df46 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReference.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReference.java @@ -21,7 +21,7 @@ * Example to create a subtype instance using the builder pattern *
*

- *     KeyReference keyReference = KeyReference.cartDiscountBuilder()
+ *     KeyReference keyReference = KeyReference.associateRoleBuilder()
  *             key("{key}")
  *             .build()
  * 
@@ -76,6 +76,22 @@ public static KeyReference deepCopy(@Nullable final KeyReference template) { return instance; } + /** + * builder for associateRole subtype + * @return builder + */ + public static com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder associateRoleBuilder() { + return com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder.of(); + } + + /** + * builder for businessUnit subtype + * @return builder + */ + public static com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder businessUnitBuilder() { + return com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder.of(); + } + /** * builder for cartDiscount subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReferenceBuilder.java index 2dff7cd28d7..3ec4eda5be7 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReferenceBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/KeyReferenceBuilder.java @@ -11,6 +11,14 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class KeyReferenceBuilder { + public com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder associateRoleBuilder() { + return com.commercetools.importapi.models.common.AssociateRoleKeyReferenceBuilder.of(); + } + + public com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder businessUnitBuilder() { + return com.commercetools.importapi.models.common.BusinessUnitKeyReferenceBuilder.of(); + } + public com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder cartDiscountBuilder() { return com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ReferenceType.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ReferenceType.java index 14cae02e400..7996e8ef972 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ReferenceType.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ReferenceType.java @@ -16,6 +16,12 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ReferenceType extends JsonEnum { + /** +

References an associate role.

*/ + ReferenceType ASSOCIATE_ROLE = ReferenceTypeEnum.ASSOCIATE_ROLE; + /** +

References a business unit.

*/ + ReferenceType BUSINESS_UNIT = ReferenceTypeEnum.BUSINESS_UNIT; /**

References a cart.

*/ ReferenceType CART = ReferenceTypeEnum.CART; @@ -81,6 +87,16 @@ public interface ReferenceType extends JsonEnum { * possible values of ReferenceType */ enum ReferenceTypeEnum implements ReferenceType { + /** + * associate-role + */ + ASSOCIATE_ROLE("associate-role"), + + /** + * business-unit + */ + BUSINESS_UNIT("business-unit"), + /** * cart */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferences.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferences.java index 81cc54dea9b..a0eea9f6ec6 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferences.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferences.java @@ -23,7 +23,7 @@ *

  *     UnresolvedReferences unresolvedReferences = UnresolvedReferences.builder()
  *             .key("{key}")
- *             .typeId(ReferenceType.CART)
+ *             .typeId(ReferenceType.ASSOCIATE_ROLE)
  *             .build()
  * 
*
diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesBuilder.java index 2dfd57beecf..a0ada6188dc 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesBuilder.java @@ -14,7 +14,7 @@ *

  *     UnresolvedReferences unresolvedReferences = UnresolvedReferences.builder()
  *             .key("{key}")
- *             .typeId(ReferenceType.CART)
+ *             .typeId(ReferenceType.ASSOCIATE_ROLE)
  *             .build()
  * 
* diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequest.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequest.java new file mode 100644 index 00000000000..c0659ba2725 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequest.java @@ -0,0 +1,146 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.importapi.models.business_units.BusinessUnitImport; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

The request body to import Business Units. Contains data for Business Units to be created or updated in a Project.

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

+ *     BusinessUnitImportRequest businessUnitImportRequest = BusinessUnitImportRequest.builder()
+ *             .plusResources(resourcesBuilder -> resourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("business-unit") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BusinessUnitImportRequestImpl.class) +public interface BusinessUnitImportRequest extends ImportRequest { + + /** + * discriminator value for BusinessUnitImportRequest + */ + String BUSINESS_UNIT = "business-unit"; + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @return resources + */ + @NotNull + @Valid + @JsonProperty("resources") + public List getResources(); + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param resources values to be set + */ + + @JsonIgnore + public void setResources(final BusinessUnitImport... resources); + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param resources values to be set + */ + + public void setResources(final List resources); + + /** + * factory method + * @return instance of BusinessUnitImportRequest + */ + public static BusinessUnitImportRequest of() { + return new BusinessUnitImportRequestImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitImportRequest + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitImportRequest of(final BusinessUnitImportRequest template) { + BusinessUnitImportRequestImpl instance = new BusinessUnitImportRequestImpl(); + instance.setResources(template.getResources()); + return instance; + } + + public BusinessUnitImportRequest copyDeep(); + + /** + * factory method to create a deep copy of BusinessUnitImportRequest + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitImportRequest deepCopy(@Nullable final BusinessUnitImportRequest template) { + if (template == null) { + return null; + } + BusinessUnitImportRequestImpl instance = new BusinessUnitImportRequestImpl(); + instance.setResources(Optional.ofNullable(template.getResources()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.business_units.BusinessUnitImport::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for BusinessUnitImportRequest + * @return builder + */ + public static BusinessUnitImportRequestBuilder builder() { + return BusinessUnitImportRequestBuilder.of(); + } + + /** + * create builder for BusinessUnitImportRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitImportRequestBuilder builder(final BusinessUnitImportRequest template) { + return BusinessUnitImportRequestBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBusinessUnitImportRequest(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestBuilder.java new file mode 100644 index 00000000000..7aa71a9744f --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestBuilder.java @@ -0,0 +1,141 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitImportRequestBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     BusinessUnitImportRequest businessUnitImportRequest = BusinessUnitImportRequest.builder()
+ *             .plusResources(resourcesBuilder -> resourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitImportRequestBuilder implements Builder { + + private java.util.List resources; + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param resources value to be set + * @return Builder + */ + + public BusinessUnitImportRequestBuilder resources( + final com.commercetools.importapi.models.business_units.BusinessUnitImport... resources) { + this.resources = new ArrayList<>(Arrays.asList(resources)); + return this; + } + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

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

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param resources value to be set + * @return Builder + */ + + public BusinessUnitImportRequestBuilder plusResources( + final com.commercetools.importapi.models.business_units.BusinessUnitImport... resources) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.addAll(Arrays.asList(resources)); + return this; + } + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param builder function to build the resources value + * @return Builder + */ + + public BusinessUnitImportRequestBuilder plusResources( + Function> builder) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add( + builder.apply(com.commercetools.importapi.models.business_units.BusinessUnitImportBuilder.of()).build()); + return this; + } + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @param builder function to build the resources value + * @return Builder + */ + + public BusinessUnitImportRequestBuilder withResources( + Function> builder) { + this.resources = new ArrayList<>(); + this.resources.add( + builder.apply(com.commercetools.importapi.models.business_units.BusinessUnitImportBuilder.of()).build()); + return this; + } + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ * @return resources + */ + + public java.util.List getResources() { + return this.resources; + } + + /** + * builds BusinessUnitImportRequest with checking for non-null required values + * @return BusinessUnitImportRequest + */ + public BusinessUnitImportRequest build() { + Objects.requireNonNull(resources, BusinessUnitImportRequest.class + ": resources is missing"); + return new BusinessUnitImportRequestImpl(resources); + } + + /** + * builds BusinessUnitImportRequest without checking for non-null required values + * @return BusinessUnitImportRequest + */ + public BusinessUnitImportRequest buildUnchecked() { + return new BusinessUnitImportRequestImpl(resources); + } + + /** + * factory method for an instance of BusinessUnitImportRequestBuilder + * @return builder + */ + public static BusinessUnitImportRequestBuilder of() { + return new BusinessUnitImportRequestBuilder(); + } + + /** + * create builder for BusinessUnitImportRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitImportRequestBuilder of(final BusinessUnitImportRequest template) { + BusinessUnitImportRequestBuilder builder = new BusinessUnitImportRequestBuilder(); + builder.resources = template.getResources(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestImpl.java new file mode 100644 index 00000000000..f249535f4fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.time.*; +import java.util.*; + +import com.commercetools.importapi.models.common.ImportResourceType; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The request body to import Business Units. Contains data for Business Units to be created or updated in a Project.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitImportRequestImpl implements BusinessUnitImportRequest, ModelBase { + + private com.commercetools.importapi.models.common.ImportResourceType type; + + private java.util.List resources; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitImportRequestImpl( + @JsonProperty("resources") final java.util.List resources) { + this.resources = resources; + this.type = ImportResourceType.findEnum("business-unit"); + } + + /** + * create empty instance + */ + public BusinessUnitImportRequestImpl() { + this.type = ImportResourceType.findEnum("business-unit"); + } + + /** + *

The resource type that can be imported.

+ */ + + public com.commercetools.importapi.models.common.ImportResourceType getType() { + return this.type; + } + + /** + *

The Business Unit import resources of this request. Can contain CompanyBusinessUnitImport or DivisionBusinessUnitImport.

+ */ + + public java.util.List getResources() { + return this.resources; + } + + public void setResources(final com.commercetools.importapi.models.business_units.BusinessUnitImport... resources) { + this.resources = new ArrayList<>(Arrays.asList(resources)); + } + + public void setResources( + final java.util.List resources) { + this.resources = resources; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitImportRequestImpl that = (BusinessUnitImportRequestImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(resources, that.resources) + .append(type, that.type) + .append(resources, that.resources) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(resources).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("resources", resources) + .build(); + } + + @Override + public BusinessUnitImportRequest copyDeep() { + return BusinessUnitImportRequest.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CategoryImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CategoryImportRequestImpl.java index ba7bb7b5710..5e3fb0f0eaf 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CategoryImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CategoryImportRequestImpl.java @@ -45,7 +45,7 @@ public CategoryImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CustomerImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CustomerImportRequestImpl.java index 16d68baf7b4..47369749f09 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CustomerImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/CustomerImportRequestImpl.java @@ -45,7 +45,7 @@ public CustomerImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java index e23c50a5ac1..9025c64bcf0 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java @@ -45,7 +45,7 @@ public DiscountCodeImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java index 84f0f18225e..ab2639139b0 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java @@ -22,7 +22,7 @@ * Example to create a subtype instance using the builder pattern *
*

- *     ImportRequest importRequest = ImportRequest.categoryBuilder()
+ *     ImportRequest importRequest = ImportRequest.businessUnitBuilder()
  *             plusResources(resourcesBuilder -> resourcesBuilder)
  *             .build()
  * 
@@ -34,7 +34,7 @@ public interface ImportRequest { /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

* @return type */ @NotNull @@ -61,6 +61,14 @@ public static ImportRequest deepCopy(@Nullable final ImportRequest template) { return instance; } + /** + * builder for businessUnit subtype + * @return builder + */ + public static com.commercetools.importapi.models.importrequests.BusinessUnitImportRequestBuilder businessUnitBuilder() { + return com.commercetools.importapi.models.importrequests.BusinessUnitImportRequestBuilder.of(); + } + /** * builder for category subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java index 2be2409f9eb..336f9b2400c 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java @@ -11,6 +11,10 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ImportRequestBuilder { + public com.commercetools.importapi.models.importrequests.BusinessUnitImportRequestBuilder businessUnitBuilder() { + return com.commercetools.importapi.models.importrequests.BusinessUnitImportRequestBuilder.of(); + } + public com.commercetools.importapi.models.importrequests.CategoryImportRequestBuilder categoryBuilder() { return com.commercetools.importapi.models.importrequests.CategoryImportRequestBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestImpl.java index dde0f0958c2..c387749d097 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestImpl.java @@ -39,7 +39,7 @@ public ImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/InventoryImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/InventoryImportRequestImpl.java index 3dc33f3f1ae..6e568c2d863 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/InventoryImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/InventoryImportRequestImpl.java @@ -45,7 +45,7 @@ public InventoryImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderImportRequestImpl.java index 57677d98338..7196649aadf 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderImportRequestImpl.java @@ -45,7 +45,7 @@ public OrderImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderPatchImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderPatchImportRequestImpl.java index c5bc2b10f61..d5ed093e1e3 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderPatchImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/OrderPatchImportRequestImpl.java @@ -45,7 +45,7 @@ public OrderPatchImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/PriceImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/PriceImportRequestImpl.java index bad60441a19..d06356f44da 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/PriceImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/PriceImportRequestImpl.java @@ -45,7 +45,7 @@ public PriceImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductDraftImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductDraftImportRequestImpl.java index 049613cc3d3..5b2c447b26d 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductDraftImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductDraftImportRequestImpl.java @@ -45,7 +45,7 @@ public ProductDraftImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductImportRequestImpl.java index ae66ee5bff8..8fcd5178aac 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductImportRequestImpl.java @@ -45,7 +45,7 @@ public ProductImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductSelectionImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductSelectionImportRequestImpl.java index 672538f8910..5447f96d2d4 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductSelectionImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductSelectionImportRequestImpl.java @@ -45,7 +45,7 @@ public ProductSelectionImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductTypeImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductTypeImportRequestImpl.java index 73059fe6376..9e5a8ea1f6f 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductTypeImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductTypeImportRequestImpl.java @@ -45,7 +45,7 @@ public ProductTypeImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantImportRequestImpl.java index 535bec5d286..64edd827698 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantImportRequestImpl.java @@ -45,7 +45,7 @@ public ProductVariantImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantPatchRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantPatchRequestImpl.java index 773e112edf2..5395b7e55b4 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantPatchRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ProductVariantPatchRequestImpl.java @@ -45,7 +45,7 @@ public ProductVariantPatchRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/StandalonePriceImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/StandalonePriceImportRequestImpl.java index 0d1f5b6b10d..d59e3ec258c 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/StandalonePriceImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/StandalonePriceImportRequestImpl.java @@ -45,7 +45,7 @@ public StandalonePriceImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/TypeImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/TypeImportRequestImpl.java index ccf10b8f0fe..bff12c1a7f3 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/TypeImportRequestImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/TypeImportRequestImpl.java @@ -45,7 +45,7 @@ public TypeImportRequestImpl() { } /** - *

The resource types that can be imported.

+ *

The resource type that can be imported.

*/ public com.commercetools.importapi.models.common.ImportResourceType getType() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceType.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceType.java index e384bdb642a..d5392d2b31a 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceType.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceType.java @@ -23,7 +23,7 @@ *
*

  *     AttributeReferenceType attributeReferenceType = AttributeReferenceType.builder()
- *             .referenceTypeId(ReferenceType.CART)
+ *             .referenceTypeId(ReferenceType.ASSOCIATE_ROLE)
  *             .build()
  * 
*
diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeBuilder.java index a8102c87c82..811021a4032 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeBuilder.java @@ -13,7 +13,7 @@ *
*

  *     AttributeReferenceType attributeReferenceType = AttributeReferenceType.builder()
- *             .referenceTypeId(ReferenceType.CART)
+ *             .referenceTypeId(ReferenceType.ASSOCIATE_ROLE)
  *             .build()
  * 
*
diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectApiRoot.java b/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectApiRoot.java index 3368e2dcb39..5a3680093d0 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectApiRoot.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectApiRoot.java @@ -117,6 +117,11 @@ public ByProjectKeyProductSelectionsRequestBuilder productSelections() { return with().productSelections(); } + @Override + public ByProjectKeyBusinessUnitsRequestBuilder businessUnits() { + return with().businessUnits(); + } + @Override public void close() { if (apiHttpClient == null) { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectScopedApiRoot.java b/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectScopedApiRoot.java index e51a365f42f..83cf193082b 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectScopedApiRoot.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java/com/commercetools/importapi/client/ProjectScopedApiRoot.java @@ -37,4 +37,6 @@ public interface ProjectScopedApiRoot { ByProjectKeyDiscountCodesRequestBuilder discountCodes(); ByProjectKeyProductSelectionsRequestBuilder productSelections(); + + ByProjectKeyBusinessUnitsRequestBuilder businessUnits(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyTest.java new file mode 100644 index 00000000000..d423ee66c3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.importapi.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.importapi.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyBusinessUnitsImportContainersByImportContainerKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKeyValue("test_projectKey") + .businessUnits() + .importContainers() + .withImportContainerKeyValue("test_importContainerKey") + .post(com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest.of()) + .createHttpRequest(), + "post", "test_projectKey/business-units/import-containers/test_importContainerKey", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .businessUnits() + .importContainers() + .withImportContainerKeyValue("test_importContainerKey") + .post(com.commercetools.importapi.models.importrequests.BusinessUnitImportRequest.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersTest.java new file mode 100644 index 00000000000..8d6a6678695 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsImportContainersTest.java @@ -0,0 +1,27 @@ + +package com.commercetools.importapi.client.resource; + +import com.commercetools.importapi.client.ApiRoot; + +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.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyBusinessUnitsImportContainersTest { + 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(); + + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsTest.java new file mode 100644 index 00000000000..298288f3270 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyBusinessUnitsTest.java @@ -0,0 +1,27 @@ + +package com.commercetools.importapi.client.resource; + +import com.commercetools.importapi.client.ApiRoot; + +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.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyBusinessUnitsTest { + 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(); + + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftTest.java new file mode 100644 index 00000000000..93fe29b7a09 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateDraftTest.java @@ -0,0 +1,47 @@ + +package com.commercetools.importapi.models.business_units; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AssociateDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AssociateDraftBuilder builder) { + AssociateDraft associateDraft = builder.buildUnchecked(); + Assertions.assertThat(associateDraft).isInstanceOf(AssociateDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "customer", + AssociateDraft.builder() + .customer(new com.commercetools.importapi.models.common.CustomerKeyReferenceImpl()) }, + new Object[] { "associateRoleAssignments", AssociateDraft.builder() + .associateRoleAssignments(Collections.singletonList( + new com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftImpl())) } }; + } + + @Test + public void customer() { + AssociateDraft value = AssociateDraft.of(); + value.setCustomer(new com.commercetools.importapi.models.common.CustomerKeyReferenceImpl()); + Assertions.assertThat(value.getCustomer()) + .isEqualTo(new com.commercetools.importapi.models.common.CustomerKeyReferenceImpl()); + } + + @Test + public void associateRoleAssignments() { + AssociateDraft value = AssociateDraft.of(); + value.setAssociateRoleAssignments(Collections.singletonList( + new com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftImpl())); + Assertions.assertThat(value.getAssociateRoleAssignments()) + .isEqualTo(Collections.singletonList( + new com.commercetools.importapi.models.business_units.AssociateRoleAssignmentDraftImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftTest.java new file mode 100644 index 00000000000..e1967261983 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/AssociateRoleAssignmentDraftTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.importapi.models.business_units; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AssociateRoleAssignmentDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AssociateRoleAssignmentDraftBuilder builder) { + AssociateRoleAssignmentDraft associateRoleAssignmentDraft = builder.buildUnchecked(); + Assertions.assertThat(associateRoleAssignmentDraft).isInstanceOf(AssociateRoleAssignmentDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "associateRole", AssociateRoleAssignmentDraft.builder() + .associateRole(new com.commercetools.importapi.models.common.AssociateRoleKeyReferenceImpl()) }, + new Object[] { "inheritance", AssociateRoleAssignmentDraft.builder() + .inheritance(com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode + .findEnum("Enabled")) } }; + } + + @Test + public void associateRole() { + AssociateRoleAssignmentDraft value = AssociateRoleAssignmentDraft.of(); + value.setAssociateRole(new com.commercetools.importapi.models.common.AssociateRoleKeyReferenceImpl()); + Assertions.assertThat(value.getAssociateRole()) + .isEqualTo(new com.commercetools.importapi.models.common.AssociateRoleKeyReferenceImpl()); + } + + @Test + public void inheritance() { + AssociateRoleAssignmentDraft value = AssociateRoleAssignmentDraft.of(); + value.setInheritance( + com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode.findEnum("Enabled")); + Assertions.assertThat(value.getInheritance()) + .isEqualTo( + com.commercetools.importapi.models.business_units.AssociateRoleInheritanceMode.findEnum("Enabled")); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportTest.java new file mode 100644 index 00000000000..6250baee002 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/CompanyBusinessUnitImportTest.java @@ -0,0 +1,33 @@ + +package com.commercetools.importapi.models.business_units; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CompanyBusinessUnitImportTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CompanyBusinessUnitImportBuilder builder) { + CompanyBusinessUnitImport companyBusinessUnitImport = builder.buildUnchecked(); + Assertions.assertThat(companyBusinessUnitImport).isInstanceOf(CompanyBusinessUnitImport.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "storeMode", CompanyBusinessUnitImport.builder() + .storeMode( + com.commercetools.importapi.models.business_units.BusinessUnitStoreMode.findEnum("Explicit")) } }; + } + + @Test + public void storeMode() { + CompanyBusinessUnitImport value = CompanyBusinessUnitImport.of(); + value.setStoreMode( + com.commercetools.importapi.models.business_units.BusinessUnitStoreMode.findEnum("Explicit")); + Assertions.assertThat(value.getStoreMode()) + .isEqualTo( + com.commercetools.importapi.models.business_units.BusinessUnitStoreMode.findEnum("Explicit")); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportTest.java new file mode 100644 index 00000000000..0ebf5778774 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/business_units/DivisionBusinessUnitImportTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.importapi.models.business_units; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DivisionBusinessUnitImportTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DivisionBusinessUnitImportBuilder builder) { + DivisionBusinessUnitImport divisionBusinessUnitImport = builder.buildUnchecked(); + Assertions.assertThat(divisionBusinessUnitImport).isInstanceOf(DivisionBusinessUnitImport.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "storeMode", + DivisionBusinessUnitImport.builder() + .storeMode(com.commercetools.importapi.models.business_units.BusinessUnitStoreMode + .findEnum("Explicit")) }, + new Object[] { "parentUnit", DivisionBusinessUnitImport.builder() + .parentUnit(new com.commercetools.importapi.models.common.BusinessUnitKeyReferenceImpl()) }, + new Object[] { "associateMode", DivisionBusinessUnitImport.builder() + .associateMode(com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode + .findEnum("Explicit")) }, + new Object[] { "approvalRuleMode", DivisionBusinessUnitImport.builder() + .approvalRuleMode(com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode + .findEnum("Explicit")) } }; + } + + @Test + public void storeMode() { + DivisionBusinessUnitImport value = DivisionBusinessUnitImport.of(); + value.setStoreMode( + com.commercetools.importapi.models.business_units.BusinessUnitStoreMode.findEnum("Explicit")); + Assertions.assertThat(value.getStoreMode()) + .isEqualTo( + com.commercetools.importapi.models.business_units.BusinessUnitStoreMode.findEnum("Explicit")); + } + + @Test + public void parentUnit() { + DivisionBusinessUnitImport value = DivisionBusinessUnitImport.of(); + value.setParentUnit(new com.commercetools.importapi.models.common.BusinessUnitKeyReferenceImpl()); + Assertions.assertThat(value.getParentUnit()) + .isEqualTo(new com.commercetools.importapi.models.common.BusinessUnitKeyReferenceImpl()); + } + + @Test + public void associateMode() { + DivisionBusinessUnitImport value = DivisionBusinessUnitImport.of(); + value.setAssociateMode( + com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode.findEnum("Explicit")); + Assertions.assertThat(value.getAssociateMode()) + .isEqualTo( + com.commercetools.importapi.models.business_units.BusinessUnitAssociateMode.findEnum("Explicit")); + } + + @Test + public void approvalRuleMode() { + DivisionBusinessUnitImport value = DivisionBusinessUnitImport.of(); + value.setApprovalRuleMode( + com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode.findEnum("Explicit")); + Assertions.assertThat(value.getApprovalRuleMode()) + .isEqualTo(com.commercetools.importapi.models.business_units.BusinessUnitApprovalRuleMode + .findEnum("Explicit")); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceTest.java new file mode 100644 index 00000000000..5d6edeef808 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/AssociateRoleKeyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.importapi.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AssociateRoleKeyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AssociateRoleKeyReferenceBuilder builder) { + AssociateRoleKeyReference associateRoleKeyReference = builder.buildUnchecked(); + Assertions.assertThat(associateRoleKeyReference).isInstanceOf(AssociateRoleKeyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", AssociateRoleKeyReference.builder().key("key") } }; + } + + @Test + public void key() { + AssociateRoleKeyReference value = AssociateRoleKeyReference.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceTest.java new file mode 100644 index 00000000000..c5af29d0ca9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/BusinessUnitKeyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.importapi.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BusinessUnitKeyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BusinessUnitKeyReferenceBuilder builder) { + BusinessUnitKeyReference businessUnitKeyReference = builder.buildUnchecked(); + Assertions.assertThat(businessUnitKeyReference).isInstanceOf(BusinessUnitKeyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", BusinessUnitKeyReference.builder().key("key") } }; + } + + @Test + public void key() { + BusinessUnitKeyReference value = BusinessUnitKeyReference.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesTest.java index c30465050de..16b1d482f42 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesTest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/common/UnresolvedReferencesTest.java @@ -18,7 +18,7 @@ public void buildUnchecked(String name, UnresolvedReferencesBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "key", UnresolvedReferences.builder().key("key") }, new Object[] { "typeId", UnresolvedReferences.builder() - .typeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")) } }; + .typeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")) } }; } @Test @@ -31,8 +31,8 @@ public void key() { @Test public void typeId() { UnresolvedReferences value = UnresolvedReferences.of(); - value.setTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); + value.setTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")); Assertions.assertThat(value.getTypeId()) - .isEqualTo(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); + .isEqualTo(com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")); } } diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerDraftTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerDraftTest.java index 3f5f3919300..400c6e09a5d 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerDraftTest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerDraftTest.java @@ -20,7 +20,7 @@ public static Object[][] objectBuilder() { new Object[] { "resourceType", ImportContainerDraft.builder() .resourceType(com.commercetools.importapi.models.common.ImportResourceType - .findEnum("category")) }, + .findEnum("business-unit")) }, new Object[] { "retentionPolicy", ImportContainerDraft.builder() .retentionPolicy( @@ -37,9 +37,9 @@ public void key() { @Test public void resourceType() { ImportContainerDraft value = ImportContainerDraft.of(); - value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); Assertions.assertThat(value.getResourceType()) - .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); } @Test diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerTest.java index 88aaa55e65c..6fa91c3e55c 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerTest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerTest.java @@ -22,7 +22,7 @@ public static Object[][] objectBuilder() { new Object[] { "resourceType", ImportContainer.builder() .resourceType(com.commercetools.importapi.models.common.ImportResourceType - .findEnum("category")) }, + .findEnum("business-unit")) }, new Object[] { "version", ImportContainer.builder().version(2L) }, new Object[] { "retentionPolicy", ImportContainer.builder() @@ -46,9 +46,9 @@ public void key() { @Test public void resourceType() { ImportContainer value = ImportContainer.of(); - value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); Assertions.assertThat(value.getResourceType()) - .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); } @Test diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerUpdateDraftTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerUpdateDraftTest.java index 18453d3da42..c0ddbb2964c 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerUpdateDraftTest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerUpdateDraftTest.java @@ -19,7 +19,7 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "version", ImportContainerUpdateDraft.builder().version(2L) }, new Object[] { "resourceType", ImportContainerUpdateDraft.builder() .resourceType( - com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")) } }; + com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")) } }; } @Test @@ -32,8 +32,8 @@ public void version() { @Test public void resourceType() { ImportContainerUpdateDraft value = ImportContainerUpdateDraft.of(); - value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + value.setResourceType(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); Assertions.assertThat(value.getResourceType()) - .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("category")); + .isEqualTo(com.commercetools.importapi.models.common.ImportResourceType.findEnum("business-unit")); } } diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestTest.java new file mode 100644 index 00000000000..0337353d535 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/BusinessUnitImportRequestTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BusinessUnitImportRequestTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BusinessUnitImportRequestBuilder builder) { + BusinessUnitImportRequest businessUnitImportRequest = builder.buildUnchecked(); + Assertions.assertThat(businessUnitImportRequest).isInstanceOf(BusinessUnitImportRequest.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "resources", + BusinessUnitImportRequest.builder() + .resources(Collections.singletonList( + new com.commercetools.importapi.models.business_units.BusinessUnitImportImpl())) } }; + } + + @Test + public void resources() { + BusinessUnitImportRequest value = BusinessUnitImportRequest.of(); + value.setResources( + Collections.singletonList(new com.commercetools.importapi.models.business_units.BusinessUnitImportImpl())); + Assertions.assertThat(value.getResources()) + .isEqualTo(Collections + .singletonList(new com.commercetools.importapi.models.business_units.BusinessUnitImportImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeTest.java index 5c2a0385af0..c9b261a5d08 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeTest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/producttypes/AttributeReferenceTypeTest.java @@ -16,15 +16,17 @@ public void buildUnchecked(String name, AttributeReferenceTypeBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "referenceTypeId", AttributeReferenceType.builder() - .referenceTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")) } }; + return new Object[][] { new Object[] { "referenceTypeId", + AttributeReferenceType.builder() + .referenceTypeId( + com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")) } }; } @Test public void referenceTypeId() { AttributeReferenceType value = AttributeReferenceType.of(); - value.setReferenceTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); + value.setReferenceTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")); Assertions.assertThat(value.getReferenceTypeId()) - .isEqualTo(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); + .isEqualTo(com.commercetools.importapi.models.common.ReferenceType.findEnum("associate-role")); } } diff --git a/references.txt b/references.txt index 5dfe32a746d..1f827bd48aa 100644 --- a/references.txt +++ b/references.txt @@ -456,3 +456,6 @@ d084ab15a8dfa7bd18efa10417a0bb263c08f269 89f530b1e54b0b03f530d64a8c36e901b6d020c1 4b73acb69ed586da4ca2893e3b698335c356d720 cb9cca64ecfb31885e7b9fb0ad52a9954b990ed9 +48dc5d57bbfede103bdf01023deea4f649dc5cae +291e2569b7c0e4f1db3bb99761c7b23e0cc1659f +b6d7def74db12344b0e0821407b45a3f214b8bd9