diff --git a/changes.md b/changes.md index 3f8468995d7..6a771d8d42e 100644 --- a/changes.md +++ b/changes.md @@ -1,8 +1,49 @@ +**Api changes** + +
+Added Type(s) + +- added type `ApprovalRuleSetCustomFieldAction` +- added type `ApprovalRuleSetCustomTypeAction` +
+ + +
+Added Property(s) + +- added property `custom` to type `ApprovalRule` +- added property `source` to type `EventBridgeDestination` +
+ + +
+Added Enum(s) + +- added enum `approval-rule` to type `CustomFieldReferenceValue` +- added enum `approval-rule` to type `ResourceTypeId` +
+ + +
+Added Method(s) + +- added method `apiRoot.withProjectKey().productTailoring().head()` +
+ **Import changes**
Added Type(s) - added type `InvalidFieldsUpdateError` +- added type `NewMasterVariantAdditionNotAllowedError` +
+ +**History changes** + +
+Required Property(s) + +- changed property `id` of type `ModifiedBy` to be optional
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 7ecc938eacd..6aabc49e4aa 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -778,6 +778,7 @@ type ApprovalRule implements Versioned { requesters: [RuleRequester!]! businessUnitRef: KeyReference! businessUnit: BusinessUnit! + custom: CustomFieldsType id: String! version: Long! createdAt: DateTime! @@ -864,6 +865,8 @@ input ApprovalRuleUpdateAction { setRequesters: SetApprovalRuleRequesters setStatus: SetApprovalRuleStatus setApprovers: SetApprovalRuleApprovers + setCustomField: SetApprovalRuleCustomField + setCustomType: SetApprovalRuleCustomType } input ApproveApprovalFlow { @@ -10532,6 +10535,18 @@ input SetApprovalRuleStatus { status: ApprovalRuleStatus! } +input SetApprovalRuleCustomField { + name: String! + value: String +} + +input SetApprovalRuleCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + input SetAssociateRoleCustomField { name: String! value: String diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringHead.java new file mode 100644 index 00000000000..2e0c8f77a0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringHead.java @@ -0,0 +1,195 @@ + +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; + +/** + *

Checks if a ProductTailoring exists for a given Query Predicate. Returns a 200 OK status if any ProductTailoring match the Query Predicate or a 404 Not Found otherwise.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .productTailoring()
+ *            .head()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyProductTailoringHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyProductTailoringHead(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyProductTailoringHead(ByProjectKeyProductTailoringHead t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/product-tailoring", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyProductTailoringHead + */ + public ByProjectKeyProductTailoringHead addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyProductTailoringHead that = (ByProjectKeyProductTailoringHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyProductTailoringHead copy() { + return new ByProjectKeyProductTailoringHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java index f5b128bc55e..6364af6546f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringRequestBuilder.java @@ -21,6 +21,10 @@ public ByProjectKeyProductTailoringGet get() { return new ByProjectKeyProductTailoringGet(apiHttpClient, projectKey); } + public ByProjectKeyProductTailoringHead head() { + return new ByProjectKeyProductTailoringHead(apiHttpClient, projectKey); + } + public ByProjectKeyProductTailoringPost post( com.commercetools.api.models.product_tailoring.ProductTailoringDraft productTailoringDraft) { return new ByProjectKeyProductTailoringPost(apiHttpClient, projectKey, productTailoringDraft); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRule.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRule.java index 90cb9a35b35..6b224068cd4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRule.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRule.java @@ -13,6 +13,7 @@ import com.commercetools.api.models.common.BaseResource; import com.commercetools.api.models.common.CreatedBy; import com.commercetools.api.models.common.LastModifiedBy; +import com.commercetools.api.models.type.CustomFields; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -162,6 +163,14 @@ public interface ApprovalRule extends BaseResource { @JsonProperty("businessUnit") public BusinessUnitKeyReference getBusinessUnit(); + /** + *

Custom Fields on the Approval Rule.

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

Unique identifier of the Approval Rule.

* @param id value to be set @@ -268,6 +277,13 @@ public interface ApprovalRule extends BaseResource { public void setBusinessUnit(final BusinessUnitKeyReference businessUnit); + /** + *

Custom Fields on the Approval Rule.

+ * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + /** * factory method * @return instance of ApprovalRule @@ -297,6 +313,7 @@ public static ApprovalRule of(final ApprovalRule template) { instance.setApprovers(template.getApprovers()); instance.setRequesters(template.getRequesters()); instance.setBusinessUnit(template.getBusinessUnit()); + instance.setCustom(template.getCustom()); return instance; } @@ -332,6 +349,7 @@ public static ApprovalRule deepCopy(@Nullable final ApprovalRule template) { .orElse(null)); instance.setBusinessUnit( com.commercetools.api.models.business_unit.BusinessUnitKeyReference.deepCopy(template.getBusinessUnit())); + instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleBuilder.java index 5a83c22f358..2610b57a445 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleBuilder.java @@ -65,6 +65,9 @@ public class ApprovalRuleBuilder implements Builder { private com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit; + @Nullable + private com.commercetools.api.models.type.CustomFields custom; + /** *

Unique identifier of the Approval Rule.

* @param id value to be set @@ -401,6 +404,41 @@ public ApprovalRuleBuilder businessUnit( return this; } + /** + *

Custom Fields on the Approval Rule.

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

Custom Fields on the Approval Rule.

+ * @param builder function to build the custom value + * @return Builder + */ + + public ApprovalRuleBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

Custom Fields on the Approval Rule.

+ * @param custom value to be set + * @return Builder + */ + + public ApprovalRuleBuilder custom(@Nullable final com.commercetools.api.models.type.CustomFields custom) { + this.custom = custom; + return this; + } + /** *

Unique identifier of the Approval Rule.

* @return id @@ -531,6 +569,16 @@ public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBu return this.businessUnit; } + /** + *

Custom Fields on the Approval Rule.

+ * @return custom + */ + + @Nullable + public com.commercetools.api.models.type.CustomFields getCustom() { + return this.custom; + } + /** * builds ApprovalRule with checking for non-null required values * @return ApprovalRule @@ -547,7 +595,7 @@ public ApprovalRule build() { Objects.requireNonNull(requesters, ApprovalRule.class + ": requesters is missing"); Objects.requireNonNull(businessUnit, ApprovalRule.class + ": businessUnit is missing"); return new ApprovalRuleImpl(id, version, createdAt, lastModifiedAt, createdBy, lastModifiedBy, key, name, - description, status, predicate, approvers, requesters, businessUnit); + description, status, predicate, approvers, requesters, businessUnit, custom); } /** @@ -556,7 +604,7 @@ public ApprovalRule build() { */ public ApprovalRule buildUnchecked() { return new ApprovalRuleImpl(id, version, createdAt, lastModifiedAt, createdBy, lastModifiedBy, key, name, - description, status, predicate, approvers, requesters, businessUnit); + description, status, predicate, approvers, requesters, businessUnit, custom); } /** @@ -588,6 +636,7 @@ public static ApprovalRuleBuilder of(final ApprovalRule template) { builder.approvers = template.getApprovers(); builder.requesters = template.getRequesters(); builder.businessUnit = template.getBusinessUnit(); + builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleImpl.java index b95943921b9..5f18900ef7e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleImpl.java @@ -50,6 +50,8 @@ public class ApprovalRuleImpl implements ApprovalRule, ModelBase { private com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit; + private com.commercetools.api.models.type.CustomFields custom; + /** * create instance with all properties */ @@ -65,7 +67,8 @@ public class ApprovalRuleImpl implements ApprovalRule, ModelBase { @JsonProperty("predicate") final String predicate, @JsonProperty("approvers") final com.commercetools.api.models.approval_rule.ApproverHierarchy approvers, @JsonProperty("requesters") final java.util.List requesters, - @JsonProperty("businessUnit") final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit) { + @JsonProperty("businessUnit") final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit, + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom) { this.id = id; this.version = version; this.createdAt = createdAt; @@ -80,6 +83,7 @@ public class ApprovalRuleImpl implements ApprovalRule, ModelBase { this.approvers = approvers; this.requesters = requesters; this.businessUnit = businessUnit; + this.custom = custom; } /** @@ -200,6 +204,14 @@ public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBu return this.businessUnit; } + /** + *

Custom Fields on the Approval Rule.

+ */ + + public com.commercetools.api.models.type.CustomFields getCustom() { + return this.custom; + } + public void setId(final String id) { this.id = id; } @@ -262,6 +274,10 @@ public void setBusinessUnit( this.businessUnit = businessUnit; } + public void setCustom(final com.commercetools.api.models.type.CustomFields custom) { + this.custom = custom; + } + @Override public boolean equals(Object o) { if (this == o) @@ -286,6 +302,7 @@ public boolean equals(Object o) { .append(approvers, that.approvers) .append(requesters, that.requesters) .append(businessUnit, that.businessUnit) + .append(custom, that.custom) .append(id, that.id) .append(version, that.version) .append(createdAt, that.createdAt) @@ -300,6 +317,7 @@ public boolean equals(Object o) { .append(approvers, that.approvers) .append(requesters, that.requesters) .append(businessUnit, that.businessUnit) + .append(custom, that.custom) .isEquals(); } @@ -319,6 +337,7 @@ public int hashCode() { .append(approvers) .append(requesters) .append(businessUnit) + .append(custom) .toHashCode(); } @@ -338,6 +357,7 @@ public String toString() { .append("approvers", approvers) .append("requesters", requesters) .append("businessUnit", businessUnit) + .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldAction.java new file mode 100644 index 00000000000..6b3cb51a8fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldAction.java @@ -0,0 +1,144 @@ + +package com.commercetools.api.models.approval_rule; + +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; + +/** + * ApprovalRuleSetCustomFieldAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApprovalRuleSetCustomFieldAction approvalRuleSetCustomFieldAction = ApprovalRuleSetCustomFieldAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApprovalRuleSetCustomFieldActionImpl.class) +public interface ApprovalRuleSetCustomFieldAction extends ApprovalRuleUpdateAction { + + /** + * discriminator value for ApprovalRuleSetCustomFieldAction + */ + String SET_CUSTOM_FIELD = "setCustomField"; + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ApprovalRuleSetCustomFieldAction + */ + public static ApprovalRuleSetCustomFieldAction of() { + return new ApprovalRuleSetCustomFieldActionImpl(); + } + + /** + * factory method to create a shallow copy ApprovalRuleSetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + public static ApprovalRuleSetCustomFieldAction of(final ApprovalRuleSetCustomFieldAction template) { + ApprovalRuleSetCustomFieldActionImpl instance = new ApprovalRuleSetCustomFieldActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ApprovalRuleSetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApprovalRuleSetCustomFieldAction deepCopy(@Nullable final ApprovalRuleSetCustomFieldAction template) { + if (template == null) { + return null; + } + ApprovalRuleSetCustomFieldActionImpl instance = new ApprovalRuleSetCustomFieldActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ApprovalRuleSetCustomFieldAction + * @return builder + */ + public static ApprovalRuleSetCustomFieldActionBuilder builder() { + return ApprovalRuleSetCustomFieldActionBuilder.of(); + } + + /** + * create builder for ApprovalRuleSetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApprovalRuleSetCustomFieldActionBuilder builder(final ApprovalRuleSetCustomFieldAction template) { + return ApprovalRuleSetCustomFieldActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApprovalRuleSetCustomFieldAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/approval_rule/ApprovalRuleSetCustomFieldActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionBuilder.java new file mode 100644 index 00000000000..1809e427b64 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.approval_rule; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApprovalRuleSetCustomFieldActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApprovalRuleSetCustomFieldAction approvalRuleSetCustomFieldAction = ApprovalRuleSetCustomFieldAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApprovalRuleSetCustomFieldActionBuilder implements Builder { + + private String name; + + @Nullable + private java.lang.Object value; + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

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

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ApprovalRuleSetCustomFieldAction with checking for non-null required values + * @return ApprovalRuleSetCustomFieldAction + */ + public ApprovalRuleSetCustomFieldAction build() { + Objects.requireNonNull(name, ApprovalRuleSetCustomFieldAction.class + ": name is missing"); + return new ApprovalRuleSetCustomFieldActionImpl(name, value); + } + + /** + * builds ApprovalRuleSetCustomFieldAction without checking for non-null required values + * @return ApprovalRuleSetCustomFieldAction + */ + public ApprovalRuleSetCustomFieldAction buildUnchecked() { + return new ApprovalRuleSetCustomFieldActionImpl(name, value); + } + + /** + * factory method for an instance of ApprovalRuleSetCustomFieldActionBuilder + * @return builder + */ + public static ApprovalRuleSetCustomFieldActionBuilder of() { + return new ApprovalRuleSetCustomFieldActionBuilder(); + } + + /** + * create builder for ApprovalRuleSetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApprovalRuleSetCustomFieldActionBuilder of(final ApprovalRuleSetCustomFieldAction template) { + ApprovalRuleSetCustomFieldActionBuilder builder = new ApprovalRuleSetCustomFieldActionBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionImpl.java new file mode 100644 index 00000000000..15d9bc7b5a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionImpl.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.models.approval_rule; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ApprovalRuleSetCustomFieldAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApprovalRuleSetCustomFieldActionImpl implements ApprovalRuleSetCustomFieldAction, ModelBase { + + private String action; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ApprovalRuleSetCustomFieldActionImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.name = name; + this.value = value; + this.action = SET_CUSTOM_FIELD; + } + + /** + * create empty instance + */ + public ApprovalRuleSetCustomFieldActionImpl() { + this.action = SET_CUSTOM_FIELD; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApprovalRuleSetCustomFieldActionImpl that = (ApprovalRuleSetCustomFieldActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeAction.java new file mode 100644 index 00000000000..49f56eb3db8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeAction.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.models.approval_rule; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.FieldContainer; +import com.commercetools.api.models.type.TypeResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * ApprovalRuleSetCustomTypeAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApprovalRuleSetCustomTypeAction approvalRuleSetCustomTypeAction = ApprovalRuleSetCustomTypeAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApprovalRuleSetCustomTypeActionImpl.class) +public interface ApprovalRuleSetCustomTypeAction extends ApprovalRuleUpdateAction { + + /** + * discriminator value for ApprovalRuleSetCustomTypeAction + */ + String SET_CUSTOM_TYPE = "setCustomType"; + + /** + *

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

+ * @return type + */ + @Valid + @JsonProperty("type") + public TypeResourceIdentifier getType(); + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

+ * @return fields + */ + @Valid + @JsonProperty("fields") + public FieldContainer getFields(); + + /** + *

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

+ * @param type value to be set + */ + + public void setType(final TypeResourceIdentifier type); + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

+ * @param fields value to be set + */ + + public void setFields(final FieldContainer fields); + + /** + * factory method + * @return instance of ApprovalRuleSetCustomTypeAction + */ + public static ApprovalRuleSetCustomTypeAction of() { + return new ApprovalRuleSetCustomTypeActionImpl(); + } + + /** + * factory method to create a shallow copy ApprovalRuleSetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + public static ApprovalRuleSetCustomTypeAction of(final ApprovalRuleSetCustomTypeAction template) { + ApprovalRuleSetCustomTypeActionImpl instance = new ApprovalRuleSetCustomTypeActionImpl(); + instance.setType(template.getType()); + instance.setFields(template.getFields()); + return instance; + } + + /** + * factory method to create a deep copy of ApprovalRuleSetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApprovalRuleSetCustomTypeAction deepCopy(@Nullable final ApprovalRuleSetCustomTypeAction template) { + if (template == null) { + return null; + } + ApprovalRuleSetCustomTypeActionImpl instance = new ApprovalRuleSetCustomTypeActionImpl(); + instance.setType(com.commercetools.api.models.type.TypeResourceIdentifier.deepCopy(template.getType())); + instance.setFields(com.commercetools.api.models.type.FieldContainer.deepCopy(template.getFields())); + return instance; + } + + /** + * builder factory method for ApprovalRuleSetCustomTypeAction + * @return builder + */ + public static ApprovalRuleSetCustomTypeActionBuilder builder() { + return ApprovalRuleSetCustomTypeActionBuilder.of(); + } + + /** + * create builder for ApprovalRuleSetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApprovalRuleSetCustomTypeActionBuilder builder(final ApprovalRuleSetCustomTypeAction template) { + return ApprovalRuleSetCustomTypeActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApprovalRuleSetCustomTypeAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/approval_rule/ApprovalRuleSetCustomTypeActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionBuilder.java new file mode 100644 index 00000000000..7024afd1b75 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionBuilder.java @@ -0,0 +1,160 @@ + +package com.commercetools.api.models.approval_rule; + +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; + +/** + * ApprovalRuleSetCustomTypeActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ApprovalRuleSetCustomTypeAction approvalRuleSetCustomTypeAction = ApprovalRuleSetCustomTypeAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApprovalRuleSetCustomTypeActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + @Nullable + private com.commercetools.api.models.type.FieldContainer fields; + + /** + *

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

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

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

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

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

+ * @param type value to be set + * @return Builder + */ + + public ApprovalRuleSetCustomTypeActionBuilder type( + @Nullable final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + return this; + } + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

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

Sets the Custom Fields fields for the ApprovalRule.

+ * @param builder function to build the fields value + * @return Builder + */ + + public ApprovalRuleSetCustomTypeActionBuilder withFields( + Function builder) { + this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()); + return this; + } + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

+ * @param fields value to be set + * @return Builder + */ + + public ApprovalRuleSetCustomTypeActionBuilder fields( + @Nullable final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + return this; + } + + /** + *

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

+ * @return type + */ + + @Nullable + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

+ * @return fields + */ + + @Nullable + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + /** + * builds ApprovalRuleSetCustomTypeAction with checking for non-null required values + * @return ApprovalRuleSetCustomTypeAction + */ + public ApprovalRuleSetCustomTypeAction build() { + return new ApprovalRuleSetCustomTypeActionImpl(type, fields); + } + + /** + * builds ApprovalRuleSetCustomTypeAction without checking for non-null required values + * @return ApprovalRuleSetCustomTypeAction + */ + public ApprovalRuleSetCustomTypeAction buildUnchecked() { + return new ApprovalRuleSetCustomTypeActionImpl(type, fields); + } + + /** + * factory method for an instance of ApprovalRuleSetCustomTypeActionBuilder + * @return builder + */ + public static ApprovalRuleSetCustomTypeActionBuilder of() { + return new ApprovalRuleSetCustomTypeActionBuilder(); + } + + /** + * create builder for ApprovalRuleSetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApprovalRuleSetCustomTypeActionBuilder of(final ApprovalRuleSetCustomTypeAction template) { + ApprovalRuleSetCustomTypeActionBuilder builder = new ApprovalRuleSetCustomTypeActionBuilder(); + builder.type = template.getType(); + builder.fields = template.getFields(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionImpl.java new file mode 100644 index 00000000000..779012f7912 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionImpl.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.models.approval_rule; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ApprovalRuleSetCustomTypeAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApprovalRuleSetCustomTypeActionImpl implements ApprovalRuleSetCustomTypeAction, ModelBase { + + private String action; + + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + private com.commercetools.api.models.type.FieldContainer fields; + + /** + * create instance with all properties + */ + @JsonCreator + ApprovalRuleSetCustomTypeActionImpl( + @JsonProperty("type") final com.commercetools.api.models.type.TypeResourceIdentifier type, + @JsonProperty("fields") final com.commercetools.api.models.type.FieldContainer fields) { + this.type = type; + this.fields = fields; + this.action = SET_CUSTOM_TYPE; + } + + /** + * create empty instance + */ + public ApprovalRuleSetCustomTypeActionImpl() { + this.action = SET_CUSTOM_TYPE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Defines the Type that extends the ApprovalRule with Custom Fields. If absent, any existing Type and Custom Fields are removed from the ApprovalRule.

+ */ + + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

Sets the Custom Fields fields for the ApprovalRule.

+ */ + + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + public void setType(final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + } + + public void setFields(final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApprovalRuleSetCustomTypeActionImpl that = (ApprovalRuleSetCustomTypeActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(type, that.type) + .append(fields, that.fields) + .append(action, that.action) + .append(type, that.type) + .append(fields, that.fields) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(type).append(fields).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("type", type) + .append("fields", fields) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateAction.java index b5a14adbd45..cbccf39f331 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateAction.java @@ -29,6 +29,8 @@ */ @JsonSubTypes({ @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversActionImpl.class, name = ApprovalRuleSetApproversAction.SET_APPROVERS), + @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldActionImpl.class, name = ApprovalRuleSetCustomFieldAction.SET_CUSTOM_FIELD), + @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeActionImpl.class, name = ApprovalRuleSetCustomTypeAction.SET_CUSTOM_TYPE), @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionActionImpl.class, name = ApprovalRuleSetDescriptionAction.SET_DESCRIPTION), @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetKeyActionImpl.class, name = ApprovalRuleSetKeyAction.SET_KEY), @JsonSubTypes.Type(value = com.commercetools.api.models.approval_rule.ApprovalRuleSetNameActionImpl.class, name = ApprovalRuleSetNameAction.SET_NAME), @@ -62,6 +64,14 @@ public static ApprovalRuleUpdateAction deepCopy(@Nullable final ApprovalRuleUpda return com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversAction .deepCopy((com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversAction) template); } + if (template instanceof com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldAction) { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldAction + .deepCopy((com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldAction) template); + } + if (template instanceof com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeAction) { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeAction + .deepCopy((com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeAction) template); + } if (template instanceof com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionAction) { return com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionAction .deepCopy((com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionAction) template); @@ -98,6 +108,22 @@ public static com.commercetools.api.models.approval_rule.ApprovalRuleSetApprover return com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversActionBuilder.of(); } + /** + * builder for setCustomField subtype + * @return builder + */ + public static com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldActionBuilder setCustomFieldBuilder() { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldActionBuilder.of(); + } + + /** + * builder for setCustomType subtype + * @return builder + */ + public static com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeActionBuilder setCustomTypeBuilder() { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeActionBuilder.of(); + } + /** * builder for setDescription subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateActionBuilder.java index 0e02ec97947..c9f6502a412 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleUpdateActionBuilder.java @@ -15,6 +15,14 @@ public com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversAction return com.commercetools.api.models.approval_rule.ApprovalRuleSetApproversActionBuilder.of(); } + public com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldActionBuilder setCustomFieldBuilder() { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomFieldActionBuilder.of(); + } + + public com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeActionBuilder setCustomTypeBuilder() { + return com.commercetools.api.models.approval_rule.ApprovalRuleSetCustomTypeActionBuilder.of(); + } + public com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionActionBuilder setDescriptionBuilder() { return com.commercetools.api.models.approval_rule.ApprovalRuleSetDescriptionActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraft.java index 9efe629d658..b723852aab7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraft.java @@ -130,6 +130,7 @@ public interface CategoryDraft extends com.commercetools.api.models.Customizable /** *

User-defined unique identifier for the Category.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.

* @return key */ @@ -223,6 +224,7 @@ public interface CategoryDraft extends com.commercetools.api.models.Customizable /** *

User-defined unique identifier for the Category.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.

* @param key value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftBuilder.java index f501bd120da..00bab25f662 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftBuilder.java @@ -456,6 +456,7 @@ public CategoryDraftBuilder setAssets( /** *

User-defined unique identifier for the Category.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.

* @param key value to be set * @return Builder */ @@ -575,6 +576,7 @@ public java.util.List getAssets( /** *

User-defined unique identifier for the Category.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.

* @return key */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftImpl.java index abe8fc6dd01..5f10e643d44 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraftImpl.java @@ -171,6 +171,7 @@ public java.util.List getAssets( /** *

User-defined unique identifier for the Category.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.

*/ public String getKey() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraft.java index 2c902f4308b..7529a2fd4d1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraft.java @@ -42,6 +42,7 @@ public interface CustomerDraft extends com.commercetools.api.models.Customizable /** *

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the Import API.

* @return key */ @@ -266,6 +267,7 @@ public interface CustomerDraft extends com.commercetools.api.models.Customizable /** *

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the Import API.

* @param key value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftBuilder.java index 375c162ae94..b575c752779 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftBuilder.java @@ -107,6 +107,7 @@ public class CustomerDraftBuilder implements Builder { /** *

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the Import API.

* @param key value to be set * @return Builder */ @@ -721,6 +722,7 @@ public CustomerDraftBuilder authenticationMode( /** *

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the Import API.

* @return key */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftImpl.java index e237ddac1e6..8ed54630126 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftImpl.java @@ -139,6 +139,7 @@ public CustomerDraftImpl() { /** *

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the Import API.

*/ public String getKey() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java index 9a17dc76dd5..3cb126fed10 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java @@ -41,6 +41,7 @@ public interface DiscountCodeDraft extends com.commercetools.api.models.Customiz /** *

User-defined unique identifier for the DiscountCode.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the Import API and the Merchant Center.

* @return key */ @@ -148,6 +149,7 @@ public interface DiscountCodeDraft extends com.commercetools.api.models.Customiz /** *

User-defined unique identifier for the DiscountCode.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the Import API and the Merchant Center.

* @param key value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java index 6ca77c24342..698edd5ea90 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java @@ -64,6 +64,7 @@ public class DiscountCodeDraftBuilder implements Builder { /** *

User-defined unique identifier for the DiscountCode.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the Import API and the Merchant Center.

* @param key value to be set * @return Builder */ @@ -391,6 +392,7 @@ public DiscountCodeDraftBuilder validUntil(@Nullable final java.time.ZonedDateTi /** *

User-defined unique identifier for the DiscountCode.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the Import API and the Merchant Center.

* @return key */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java index 8a5aef4446e..bfc8a8fdf54 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java @@ -87,6 +87,7 @@ public DiscountCodeDraftImpl() { /** *

User-defined unique identifier for the DiscountCode.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the Import API and the Merchant Center.

*/ public String getKey() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTrigger.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTrigger.java index 846eb3ab87a..5ee809c81f9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTrigger.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTrigger.java @@ -33,7 +33,7 @@ public interface ExtensionTrigger { /** - *

cart, order, payment, customer, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

+ *

cart, order, payment, customer, customer-group, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

* @return resourceTypeId */ @NotNull @@ -57,7 +57,7 @@ public interface ExtensionTrigger { public String getCondition(); /** - *

cart, order, payment, customer, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

+ *

cart, order, payment, customer, customer-group, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

* @param resourceTypeId value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerBuilder.java index dc1b3a1dccb..1b211381fd0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerBuilder.java @@ -32,7 +32,7 @@ public class ExtensionTriggerBuilder implements Builder { private String condition; /** - *

cart, order, payment, customer, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

+ *

cart, order, payment, customer, customer-group, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

* @param resourceTypeId value to be set * @return Builder */ @@ -93,7 +93,7 @@ public ExtensionTriggerBuilder condition(@Nullable final String condition) { } /** - *

cart, order, payment, customer, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

+ *

cart, order, payment, customer, customer-group, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

* @return resourceTypeId */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerImpl.java index c01222a8c68..e281385b9c6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/extension/ExtensionTriggerImpl.java @@ -48,7 +48,7 @@ public ExtensionTriggerImpl() { } /** - *

cart, order, payment, customer, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

+ *

cart, order, payment, customer, customer-group, quote-request, staged-quote, quote, business-unit, and shopping-list are supported.

*/ public com.commercetools.api.models.extension.ExtensionResourceTypeId getResourceTypeId() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraft.java index 4f19ecb0d86..ed73e8dc229 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraft.java @@ -47,6 +47,7 @@ public interface InventoryEntryDraft extends com.commercetools.api.models.Custom /** *

User-defined unique identifier for the InventoryEntry.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.

* @return key */ @@ -102,6 +103,7 @@ public interface InventoryEntryDraft extends com.commercetools.api.models.Custom /** *

User-defined unique identifier for the InventoryEntry.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.

* @param key value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftBuilder.java index a984996b393..773bfb4c6ea 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftBuilder.java @@ -57,6 +57,7 @@ public InventoryEntryDraftBuilder sku(final String sku) { /** *

User-defined unique identifier for the InventoryEntry.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.

* @param key value to be set * @return Builder */ @@ -183,6 +184,7 @@ public String getSku() { /** *

User-defined unique identifier for the InventoryEntry.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.

* @return key */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftImpl.java index 431cbf03dc1..57448519574 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryDraftImpl.java @@ -71,6 +71,7 @@ public String getSku() { /** *

User-defined unique identifier for the InventoryEntry.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.

*/ public String getKey() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductData.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductData.java index b66f25eb5fa..b0a06129886 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductData.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductData.java @@ -84,7 +84,7 @@ public interface ProductData extends ProductDataLike { public LocalizedString getSlug(); /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @return metaTitle */ @Valid @@ -92,7 +92,7 @@ public interface ProductData extends ProductDataLike { public LocalizedString getMetaTitle(); /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @return metaDescription */ @Valid @@ -178,14 +178,14 @@ public interface ProductData extends ProductDataLike { public void setSlug(final LocalizedString slug); /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

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

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @param metaDescription value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataBuilder.java index 120c540ccef..9f794f7dfe7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataBuilder.java @@ -288,7 +288,7 @@ public ProductDataBuilder slug(final com.commercetools.api.models.common.Localiz } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -300,7 +300,7 @@ public ProductDataBuilder metaTitle( } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -312,7 +312,7 @@ public ProductDataBuilder withMetaTitle( } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param metaTitle value to be set * @return Builder */ @@ -323,7 +323,7 @@ public ProductDataBuilder metaTitle(@Nullable final com.commercetools.api.models } /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @param builder function to build the metaDescription value * @return Builder */ @@ -335,7 +335,7 @@ public ProductDataBuilder metaDescription( } /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @param builder function to build the metaDescription value * @return Builder */ @@ -347,7 +347,7 @@ public ProductDataBuilder withMetaDescription( } /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @param metaDescription value to be set * @return Builder */ @@ -599,7 +599,7 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @return metaTitle */ @@ -609,7 +609,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

* @return metaDescription */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataImpl.java index 0c08ca63dcd..7528c02e670 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDataImpl.java @@ -119,7 +119,7 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

*/ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { @@ -127,7 +127,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Description of the Product displayed in search results below the meta title.

+ *

Description of the Product as displayed in search engine results below the meta title.

*/ public com.commercetools.api.models.common.LocalizedString getMetaDescription() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraft.java index 47793d3ade9..62725325940 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraft.java @@ -70,7 +70,8 @@ public interface ProductDraft /** *

User-defined unique identifier for the Product.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center.

+ *

To update a Product using the Import API or Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @return key */ @@ -102,7 +103,7 @@ public interface ProductDraft public CategoryOrderHints getCategoryOrderHints(); /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @return metaTitle */ @Valid @@ -110,7 +111,7 @@ public interface ProductDraft public LocalizedString getMetaTitle(); /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @return metaDescription */ @Valid @@ -204,7 +205,8 @@ public interface ProductDraft /** *

User-defined unique identifier for the Product.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center.

+ *

To update a Product using the Import API or Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @param key value to be set */ @@ -240,14 +242,14 @@ public interface ProductDraft public void setCategoryOrderHints(final CategoryOrderHints categoryOrderHints); /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

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

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @param metaDescription value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftBuilder.java index f1a1c517544..ceeda86f13f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftBuilder.java @@ -185,7 +185,8 @@ public ProductDraftBuilder slug(final com.commercetools.api.models.common.Locali /** *

User-defined unique identifier for the Product.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center.

+ *

To update a Product using the Import API or Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @param key value to be set * @return Builder */ @@ -361,7 +362,7 @@ public ProductDraftBuilder categoryOrderHints( } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -373,7 +374,7 @@ public ProductDraftBuilder metaTitle( } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -385,7 +386,7 @@ public ProductDraftBuilder withMetaTitle( } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @param metaTitle value to be set * @return Builder */ @@ -397,7 +398,7 @@ public ProductDraftBuilder metaTitle( } /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @param builder function to build the metaDescription value * @return Builder */ @@ -409,7 +410,7 @@ public ProductDraftBuilder metaDescription( } /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @param builder function to build the metaDescription value * @return Builder */ @@ -421,7 +422,7 @@ public ProductDraftBuilder withMetaDescription( } /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @param metaDescription value to be set * @return Builder */ @@ -756,7 +757,8 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { /** *

User-defined unique identifier for the Product.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center.

+ *

To update a Product using the Import API or Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @return key */ @@ -796,7 +798,7 @@ public com.commercetools.api.models.product.CategoryOrderHints getCategoryOrderH } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

* @return metaTitle */ @@ -806,7 +808,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

* @return metaDescription */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftImpl.java index e14cc44f2d7..c162e2982ef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductDraftImpl.java @@ -129,7 +129,8 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { /** *

User-defined unique identifier for the Product.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the Import API and the Merchant Center.

+ *

To update a Product using the Import API or Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

*/ public String getKey() { @@ -161,7 +162,7 @@ public com.commercetools.api.models.product.CategoryOrderHints getCategoryOrderH } /** - *

Title of the Product displayed in search results.

+ *

Title of the Product as displayed in search engine results.

*/ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { @@ -169,7 +170,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Description of the Product displayed in search results.

+ *

Description of the Product as displayed in search engine results.

*/ public com.commercetools.api.models.common.LocalizedString getMetaDescription() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyAction.java index b392c3ed18d..8cfd12f5d97 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyAction.java @@ -35,7 +35,7 @@ public interface ProductSetKeyAction extends ProductUpdateAction { /** *

Value to set. If empty, any existing value will be removed.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @return key */ @@ -44,7 +44,7 @@ public interface ProductSetKeyAction extends ProductUpdateAction { /** *

Value to set. If empty, any existing value will be removed.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @param key value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionBuilder.java index 9a7095971fe..0a6ae8d1c08 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionBuilder.java @@ -27,7 +27,7 @@ public class ProductSetKeyActionBuilder implements Builder /** *

Value to set. If empty, any existing value will be removed.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @param key value to be set * @return Builder */ @@ -39,7 +39,7 @@ public ProductSetKeyActionBuilder key(@Nullable final String key) { /** *

Value to set. If empty, any existing value will be removed.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

* @return key */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionImpl.java index 50078a53fe8..1e5f12b8ff8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductSetKeyActionImpl.java @@ -52,7 +52,7 @@ public String getAction() { /** *

Value to set. If empty, any existing value will be removed.

- *

To update a Product using the Import API, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

+ *

To update a Product using the Import API and the Merchant Center, the Product key must match the pattern ^[A-Za-z0-9_-]{2,256}$.

*/ public String getKey() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java index 09906416cff..6c7b8d0a8c9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java @@ -49,7 +49,7 @@ public interface ProductTailoringData { public LocalizedString getDescription(); /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

* @return metaTitle */ @Valid @@ -57,7 +57,7 @@ public interface ProductTailoringData { public LocalizedString getMetaTitle(); /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

* @return metaDescription */ @Valid @@ -65,7 +65,7 @@ public interface ProductTailoringData { public LocalizedString getMetaDescription(); /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @return metaKeywords */ @Valid @@ -103,21 +103,21 @@ public interface ProductTailoringData { public void setDescription(final LocalizedString description); /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

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

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

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

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @param metaKeywords value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java index 430349ada84..41a246f35a4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java @@ -116,7 +116,7 @@ public ProductTailoringDataBuilder description( } /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -128,7 +128,7 @@ public ProductTailoringDataBuilder metaTitle( } /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

* @param builder function to build the metaTitle value * @return Builder */ @@ -140,7 +140,7 @@ public ProductTailoringDataBuilder withMetaTitle( } /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

* @param metaTitle value to be set * @return Builder */ @@ -152,7 +152,7 @@ public ProductTailoringDataBuilder metaTitle( } /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

* @param builder function to build the metaDescription value * @return Builder */ @@ -164,7 +164,7 @@ public ProductTailoringDataBuilder metaDescription( } /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

* @param builder function to build the metaDescription value * @return Builder */ @@ -176,7 +176,7 @@ public ProductTailoringDataBuilder withMetaDescription( } /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

* @param metaDescription value to be set * @return Builder */ @@ -188,7 +188,7 @@ public ProductTailoringDataBuilder metaDescription( } /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @param builder function to build the metaKeywords value * @return Builder */ @@ -200,7 +200,7 @@ public ProductTailoringDataBuilder metaKeywords( } /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @param builder function to build the metaKeywords value * @return Builder */ @@ -212,7 +212,7 @@ public ProductTailoringDataBuilder withMetaKeywords( } /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @param metaKeywords value to be set * @return Builder */ @@ -372,7 +372,7 @@ public com.commercetools.api.models.common.LocalizedString getDescription() { } /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

* @return metaTitle */ @@ -382,7 +382,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

* @return metaDescription */ @@ -392,7 +392,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaDescription() } /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

* @return metaKeywords */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java index a6b19d6ab5a..89469b9d743 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java @@ -79,7 +79,7 @@ public com.commercetools.api.models.common.LocalizedString getDescription() { } /** - *

Tailored title of the Product used by external search engines for improved search engine performance.

+ *

Tailored title of the Product as displayed in search engine results.

*/ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { @@ -87,7 +87,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaTitle() { } /** - *

Tailored description of the Product used by external search engines for improved search engine performance.

+ *

Tailored description of the Product as displayed in search engine results.

*/ public com.commercetools.api.models.common.LocalizedString getMetaDescription() { @@ -95,7 +95,7 @@ public com.commercetools.api.models.common.LocalizedString getMetaDescription() } /** - *

Tailored keywords related to the Product used by external search engines for improved search engine performance.

+ *

Tailored keywords related to the Product that are used by search engines.

*/ public com.commercetools.api.models.common.LocalizedString getMetaKeywords() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java index 6379916120d..15b643fb447 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java @@ -79,7 +79,7 @@ public interface ShoppingListAddLineItemAction extends ShoppingListUpdateAction, public Long getQuantity(); /** - *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* @return addedAt */ @@ -130,7 +130,7 @@ public interface ShoppingListAddLineItemAction extends ShoppingListUpdateAction, public void setQuantity(final Long quantity); /** - *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* @param addedAt value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java index 52ab052ae24..c90e127ec23 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java @@ -100,7 +100,7 @@ public ShoppingListAddLineItemActionBuilder quantity(@Nullable final Long quanti } /** - *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* @param addedAt value to be set * @return Builder */ @@ -197,7 +197,7 @@ public Long getQuantity() { } /** - *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* @return addedAt */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java index 7bf8d6bb6ab..ae2955d99fc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java @@ -113,7 +113,7 @@ public Long getQuantity() { } /** - *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

*/ public java.time.ZonedDateTime getAddedAt() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestination.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestination.java index 6945b800230..b224f3a328d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestination.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestination.java @@ -24,6 +24,7 @@ * EventBridgeDestination eventBridgeDestination = EventBridgeDestination.builder() * .region("{region}") * .accountId("{accountId}") + * .source("{source}") * .build() * * @@ -53,6 +54,14 @@ public interface EventBridgeDestination extends Destination { @JsonProperty("accountId") public String getAccountId(); + /** + *

URN for the EventBridge destination.

+ * @return source + */ + @NotNull + @JsonProperty("source") + public String getSource(); + /** *

AWS region that receives the events.

* @param region value to be set @@ -67,6 +76,13 @@ public interface EventBridgeDestination extends Destination { public void setAccountId(final String accountId); + /** + *

URN for the EventBridge destination.

+ * @param source value to be set + */ + + public void setSource(final String source); + /** * factory method * @return instance of EventBridgeDestination @@ -84,6 +100,7 @@ public static EventBridgeDestination of(final EventBridgeDestination template) { EventBridgeDestinationImpl instance = new EventBridgeDestinationImpl(); instance.setRegion(template.getRegion()); instance.setAccountId(template.getAccountId()); + instance.setSource(template.getSource()); return instance; } @@ -100,6 +117,7 @@ public static EventBridgeDestination deepCopy(@Nullable final EventBridgeDestina EventBridgeDestinationImpl instance = new EventBridgeDestinationImpl(); instance.setRegion(template.getRegion()); instance.setAccountId(template.getAccountId()); + instance.setSource(template.getSource()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationBuilder.java index 30118ba9129..04e69b84145 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationBuilder.java @@ -15,6 +15,7 @@ * EventBridgeDestination eventBridgeDestination = EventBridgeDestination.builder() * .region("{region}") * .accountId("{accountId}") + * .source("{source}") * .build() * * @@ -26,6 +27,8 @@ public class EventBridgeDestinationBuilder implements BuilderAWS region that receives the events.

* @param region value to be set @@ -48,6 +51,17 @@ public EventBridgeDestinationBuilder accountId(final String accountId) { return this; } + /** + *

URN for the EventBridge destination.

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

AWS region that receives the events.

* @return region @@ -66,6 +80,15 @@ public String getAccountId() { return this.accountId; } + /** + *

URN for the EventBridge destination.

+ * @return source + */ + + public String getSource() { + return this.source; + } + /** * builds EventBridgeDestination with checking for non-null required values * @return EventBridgeDestination @@ -73,7 +96,8 @@ public String getAccountId() { public EventBridgeDestination build() { Objects.requireNonNull(region, EventBridgeDestination.class + ": region is missing"); Objects.requireNonNull(accountId, EventBridgeDestination.class + ": accountId is missing"); - return new EventBridgeDestinationImpl(region, accountId); + Objects.requireNonNull(source, EventBridgeDestination.class + ": source is missing"); + return new EventBridgeDestinationImpl(region, accountId, source); } /** @@ -81,7 +105,7 @@ public EventBridgeDestination build() { * @return EventBridgeDestination */ public EventBridgeDestination buildUnchecked() { - return new EventBridgeDestinationImpl(region, accountId); + return new EventBridgeDestinationImpl(region, accountId, source); } /** @@ -101,6 +125,7 @@ public static EventBridgeDestinationBuilder of(final EventBridgeDestination temp EventBridgeDestinationBuilder builder = new EventBridgeDestinationBuilder(); builder.region = template.getRegion(); builder.accountId = template.getAccountId(); + builder.source = template.getSource(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationImpl.java index b1be1a9afe7..5b39435f430 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationImpl.java @@ -28,14 +28,17 @@ public class EventBridgeDestinationImpl implements EventBridgeDestination, Model private String accountId; + private String source; + /** * create instance with all properties */ @JsonCreator EventBridgeDestinationImpl(@JsonProperty("region") final String region, - @JsonProperty("accountId") final String accountId) { + @JsonProperty("accountId") final String accountId, @JsonProperty("source") final String source) { this.region = region; this.accountId = accountId; + this.source = source; this.type = EVENT_BRIDGE; } @@ -70,6 +73,14 @@ public String getAccountId() { return this.accountId; } + /** + *

URN for the EventBridge destination.

+ */ + + public String getSource() { + return this.source; + } + public void setRegion(final String region) { this.region = region; } @@ -78,6 +89,10 @@ public void setAccountId(final String accountId) { this.accountId = accountId; } + public void setSource(final String source) { + this.source = source; + } + @Override public boolean equals(Object o) { if (this == o) @@ -91,15 +106,17 @@ public boolean equals(Object o) { return new EqualsBuilder().append(type, that.type) .append(region, that.region) .append(accountId, that.accountId) + .append(source, that.source) .append(type, that.type) .append(region, that.region) .append(accountId, that.accountId) + .append(source, that.source) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(region).append(accountId).toHashCode(); + return new HashCodeBuilder(17, 37).append(type).append(region).append(accountId).append(source).toHashCode(); } @Override @@ -107,6 +124,7 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) .append("region", region) .append("accountId", accountId) + .append("source", source) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java index 2ec672dc97d..044e97a24a9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java @@ -20,6 +20,9 @@ public interface CustomFieldReferenceValue extends JsonEnum {

ApprovalFlow

*/ CustomFieldReferenceValue APPROVAL_FLOW = CustomFieldReferenceValueEnum.APPROVAL_FLOW; /** +

ApprovalRule

*/ + CustomFieldReferenceValue APPROVAL_RULE = CustomFieldReferenceValueEnum.APPROVAL_RULE; + /**

AssociateRole

*/ CustomFieldReferenceValue ASSOCIATE_ROLE = CustomFieldReferenceValueEnum.ASSOCIATE_ROLE; /** @@ -77,6 +80,11 @@ enum CustomFieldReferenceValueEnum implements CustomFieldReferenceValue { */ APPROVAL_FLOW("approval-flow"), + /** + * approval-rule + */ + APPROVAL_RULE("approval-rule"), + /** * associate-role */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java index 6d1e97c9869..3e762b67c98 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java @@ -26,6 +26,9 @@ public interface ResourceTypeId extends JsonEnum {

ApprovalFlow

*/ ResourceTypeId APPROVAL_FLOW = ResourceTypeIdEnum.APPROVAL_FLOW; /** +

ApprovalRule

*/ + ResourceTypeId APPROVAL_RULE = ResourceTypeIdEnum.APPROVAL_RULE; + /**

AssociateRole

*/ ResourceTypeId ASSOCIATE_ROLE = ResourceTypeIdEnum.ASSOCIATE_ROLE; /** @@ -135,6 +138,11 @@ enum ResourceTypeIdEnum implements ResourceTypeId { */ APPROVAL_FLOW("approval-flow"), + /** + * approval-rule + */ + APPROVAL_RULE("approval-rule"), + /** * associate-role */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/approval_rule/ApprovalRuleExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/approval_rule/ApprovalRuleExpansionBuilderDsl.java index 371db5b5caa..4ac7aebb89c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/approval_rule/ApprovalRuleExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/approval_rule/ApprovalRuleExpansionBuilderDsl.java @@ -38,4 +38,9 @@ public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansion return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl .of(appendOne(path, "lastModifiedBy")); } + + public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl custom() { + return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl + .of(appendOne(path, "custom")); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleQueryBuilderDsl.java index 6aa42d5f5a4..2bde97b62d7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleQueryBuilderDsl.java @@ -118,4 +118,13 @@ public CombinationQueryPredicate businessUnit( ApprovalRuleQueryBuilderDsl::of); } + public CombinationQueryPredicate custom( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("custom")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + ApprovalRuleQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomFieldActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomFieldActionQueryBuilderDsl.java new file mode 100644 index 00000000000..b4f2ce515d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomFieldActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.approval_rule; + +import com.commercetools.api.predicates.query.*; + +public class ApprovalRuleSetCustomFieldActionQueryBuilderDsl { + public ApprovalRuleSetCustomFieldActionQueryBuilderDsl() { + } + + public static ApprovalRuleSetCustomFieldActionQueryBuilderDsl of() { + return new ApprovalRuleSetCustomFieldActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ApprovalRuleSetCustomFieldActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomTypeActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomTypeActionQueryBuilderDsl.java new file mode 100644 index 00000000000..3395830a7cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleSetCustomTypeActionQueryBuilderDsl.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.predicates.query.approval_rule; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ApprovalRuleSetCustomTypeActionQueryBuilderDsl { + public ApprovalRuleSetCustomTypeActionQueryBuilderDsl() { + } + + public static ApprovalRuleSetCustomTypeActionQueryBuilderDsl of() { + return new ApprovalRuleSetCustomTypeActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ApprovalRuleSetCustomTypeActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate type( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("type")) + .inner(fn.apply( + com.commercetools.api.predicates.query.type.TypeResourceIdentifierQueryBuilderDsl.of())), + ApprovalRuleSetCustomTypeActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate fields( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("fields")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.FieldContainerQueryBuilderDsl.of())), + ApprovalRuleSetCustomTypeActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleUpdateActionQueryBuilderDsl.java index 5f9ad8530e1..2d941bf86d7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/approval_rule/ApprovalRuleUpdateActionQueryBuilderDsl.java @@ -26,6 +26,20 @@ public CombinationQueryPredicate asSetA ApprovalRuleUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetCustomField( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.approval_rule.ApprovalRuleSetCustomFieldActionQueryBuilderDsl.of()), + ApprovalRuleUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetCustomType( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.approval_rule.ApprovalRuleSetCustomTypeActionQueryBuilderDsl.of()), + ApprovalRuleUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetDescription( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/subscription/EventBridgeDestinationQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/subscription/EventBridgeDestinationQueryBuilderDsl.java index 70a6f2eb278..5bda1b106cf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/subscription/EventBridgeDestinationQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/subscription/EventBridgeDestinationQueryBuilderDsl.java @@ -29,4 +29,10 @@ public StringComparisonPredicateBuilder a p -> new CombinationQueryPredicate<>(p, EventBridgeDestinationQueryBuilderDsl::of)); } + public StringComparisonPredicateBuilder source() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("source")), + p -> new CombinationQueryPredicate<>(p, EventBridgeDestinationQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java index 5d6bdcb88e0..af17cbe850f 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductTailoringTest.java @@ -103,6 +103,13 @@ public static Object[][] requestWithMethodParameters() { "get", "test_projectKey/product-tailoring?var.varName=var.varName", }, new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get().createHttpRequest(), "get", "test_projectKey/product-tailoring", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productTailoring() + .head() + .withWhere("where") + .createHttpRequest(), "head", "test_projectKey/product-tailoring?where=where", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().head().createHttpRequest(), + "head", "test_projectKey/product-tailoring", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productTailoring() .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()) @@ -130,6 +137,9 @@ public static Object[][] executeMethodParameters() { .get() .withPredicateVar("varName", "var.varName"), }, new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").productTailoring().head().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").productTailoring().head(), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productTailoring() .post(com.commercetools.api.models.product_tailoring.ProductTailoringDraft.of()) diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionTest.java new file mode 100644 index 00000000000..456a87e1f57 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomFieldActionTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.approval_rule; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ApprovalRuleSetCustomFieldActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ApprovalRuleSetCustomFieldActionBuilder builder) { + ApprovalRuleSetCustomFieldAction approvalRuleSetCustomFieldAction = builder.buildUnchecked(); + Assertions.assertThat(approvalRuleSetCustomFieldAction).isInstanceOf(ApprovalRuleSetCustomFieldAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ApprovalRuleSetCustomFieldAction.builder().name("name") }, + new Object[] { ApprovalRuleSetCustomFieldAction.builder().value("value") } }; + } + + @Test + public void name() { + ApprovalRuleSetCustomFieldAction value = ApprovalRuleSetCustomFieldAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ApprovalRuleSetCustomFieldAction value = ApprovalRuleSetCustomFieldAction.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionTest.java new file mode 100644 index 00000000000..460c6326b9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleSetCustomTypeActionTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.api.models.approval_rule; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ApprovalRuleSetCustomTypeActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ApprovalRuleSetCustomTypeActionBuilder builder) { + ApprovalRuleSetCustomTypeAction approvalRuleSetCustomTypeAction = builder.buildUnchecked(); + Assertions.assertThat(approvalRuleSetCustomTypeAction).isInstanceOf(ApprovalRuleSetCustomTypeAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ApprovalRuleSetCustomTypeAction.builder() + .type(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()) }, + new Object[] { ApprovalRuleSetCustomTypeAction.builder() + .fields(new com.commercetools.api.models.type.FieldContainerImpl()) } }; + } + + @Test + public void type() { + ApprovalRuleSetCustomTypeAction value = ApprovalRuleSetCustomTypeAction.of(); + value.setType(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + Assertions.assertThat(value.getType()) + .isEqualTo(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + } + + @Test + public void fields() { + ApprovalRuleSetCustomTypeAction value = ApprovalRuleSetCustomTypeAction.of(); + value.setFields(new com.commercetools.api.models.type.FieldContainerImpl()); + Assertions.assertThat(value.getFields()).isEqualTo(new com.commercetools.api.models.type.FieldContainerImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleTest.java index 88ec89aa9e5..b0711ae23e8 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/approval_rule/ApprovalRuleTest.java @@ -47,8 +47,9 @@ public static Object[][] objectBuilder() { .requesters(Collections .singletonList(new com.commercetools.api.models.approval_rule.RuleRequesterImpl())) }, new Object[] { ApprovalRule.builder() - .businessUnit( - new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()) } }; + .businessUnit(new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()) }, + new Object[] { + ApprovalRule.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) } }; } @Test @@ -155,4 +156,11 @@ public void businessUnit() { Assertions.assertThat(value.getBusinessUnit()) .isEqualTo(new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()); } + + @Test + public void custom() { + ApprovalRule value = ApprovalRule.of(); + value.setCustom(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()).isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationTest.java index 8be443299f1..b842bc3c60e 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/subscription/EventBridgeDestinationTest.java @@ -25,7 +25,8 @@ public void buildUnchecked(EventBridgeDestinationBuilder builder) { @DataProvider public static Object[][] objectBuilder() { return new Object[][] { new Object[] { EventBridgeDestination.builder().region("region") }, - new Object[] { EventBridgeDestination.builder().accountId("accountId") } }; + new Object[] { EventBridgeDestination.builder().accountId("accountId") }, + new Object[] { EventBridgeDestination.builder().source("source") } }; } @Test @@ -41,4 +42,11 @@ public void accountId() { value.setAccountId("accountId"); Assertions.assertThat(value.getAccountId()).isEqualTo("accountId"); } + + @Test + public void source() { + EventBridgeDestination value = EventBridgeDestination.of(); + value.setSource("source"); + Assertions.assertThat(value.getSource()).isEqualTo("source"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedBy.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedBy.java index 688adbc4082..dcfddf7f786 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedBy.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedBy.java @@ -24,9 +24,8 @@ *
*

  *     ModifiedBy modifiedBy = ModifiedBy.builder()
- *             .id("{id}")
- *             .type("{type}")
  *             .isPlatformClient(true)
+ *             .type("{type}")
  *             .build()
  * 
*
@@ -35,12 +34,20 @@ @JsonDeserialize(as = ModifiedByImpl.class) public interface ModifiedBy { + /** + *

true if the change was made using the Merchant Center or ImpEx.

+ * @return isPlatformClient + */ + @NotNull + @JsonProperty("isPlatformClient") + public Boolean getIsPlatformClient(); + /** *

ID of the Merchant Center user who made the change.

- *

Present only if the change was made in the Merchant Center.

+ *

Present only if isPlatformClient is true.

* @return id */ - @NotNull + @JsonProperty("id") public String getId(); @@ -93,15 +100,14 @@ public interface ModifiedBy { /** *

true if the change was made using the Merchant Center or ImpEx.

- * @return isPlatformClient + * @param isPlatformClient value to be set */ - @NotNull - @JsonProperty("isPlatformClient") - public Boolean getIsPlatformClient(); + + public void setIsPlatformClient(final Boolean isPlatformClient); /** *

ID of the Merchant Center user who made the change.

- *

Present only if the change was made in the Merchant Center.

+ *

Present only if isPlatformClient is true.

* @param id value to be set */ @@ -149,13 +155,6 @@ public interface ModifiedBy { public void setAssociate(final Reference associate); - /** - *

true if the change was made using the Merchant Center or ImpEx.

- * @param isPlatformClient value to be set - */ - - public void setIsPlatformClient(final Boolean isPlatformClient); - /** * factory method * @return instance of ModifiedBy @@ -171,13 +170,13 @@ public static ModifiedBy of() { */ public static ModifiedBy of(final ModifiedBy template) { ModifiedByImpl instance = new ModifiedByImpl(); + instance.setIsPlatformClient(template.getIsPlatformClient()); instance.setId(template.getId()); instance.setType(template.getType()); instance.setClientId(template.getClientId()); instance.setAnonymousId(template.getAnonymousId()); instance.setCustomer(template.getCustomer()); instance.setAssociate(template.getAssociate()); - instance.setIsPlatformClient(template.getIsPlatformClient()); return instance; } @@ -192,13 +191,13 @@ public static ModifiedBy deepCopy(@Nullable final ModifiedBy template) { return null; } ModifiedByImpl instance = new ModifiedByImpl(); + instance.setIsPlatformClient(template.getIsPlatformClient()); instance.setId(template.getId()); instance.setType(template.getType()); instance.setClientId(template.getClientId()); instance.setAnonymousId(template.getAnonymousId()); instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer())); instance.setAssociate(com.commercetools.history.models.common.Reference.deepCopy(template.getAssociate())); - instance.setIsPlatformClient(template.getIsPlatformClient()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java index c53614c3bf0..12bcd3f5195 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java @@ -16,9 +16,8 @@ *
*

  *     ModifiedBy modifiedBy = ModifiedBy.builder()
- *             .id("{id}")
- *             .type("{type}")
  *             .isPlatformClient(true)
+ *             .type("{type}")
  *             .build()
  * 
*
@@ -26,6 +25,9 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ModifiedByBuilder implements Builder { + private Boolean isPlatformClient; + + @Nullable private String id; private String type; @@ -42,16 +44,25 @@ public class ModifiedByBuilder implements Builder { @Nullable private com.commercetools.history.models.common.Reference associate; - private Boolean isPlatformClient; + /** + *

true if the change was made using the Merchant Center or ImpEx.

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

ID of the Merchant Center user who made the change.

- *

Present only if the change was made in the Merchant Center.

+ *

Present only if isPlatformClient is true.

* @param id value to be set * @return Builder */ - public ModifiedByBuilder id(final String id) { + public ModifiedByBuilder id(@Nullable final String id) { this.id = id; return this; } @@ -170,21 +181,20 @@ public ModifiedByBuilder associate(@Nullable final com.commercetools.history.mod /** *

true if the change was made using the Merchant Center or ImpEx.

- * @param isPlatformClient value to be set - * @return Builder + * @return isPlatformClient */ - public ModifiedByBuilder isPlatformClient(final Boolean isPlatformClient) { - this.isPlatformClient = isPlatformClient; - return this; + public Boolean getIsPlatformClient() { + return this.isPlatformClient; } /** *

ID of the Merchant Center user who made the change.

- *

Present only if the change was made in the Merchant Center.

+ *

Present only if isPlatformClient is true.

* @return id */ + @Nullable public String getId() { return this.id; } @@ -245,24 +255,14 @@ public com.commercetools.history.models.common.Reference getAssociate() { return this.associate; } - /** - *

true if the change was made using the Merchant Center or ImpEx.

- * @return isPlatformClient - */ - - public Boolean getIsPlatformClient() { - return this.isPlatformClient; - } - /** * builds ModifiedBy with checking for non-null required values * @return ModifiedBy */ public ModifiedBy build() { - Objects.requireNonNull(id, ModifiedBy.class + ": id is missing"); - Objects.requireNonNull(type, ModifiedBy.class + ": type is missing"); Objects.requireNonNull(isPlatformClient, ModifiedBy.class + ": isPlatformClient is missing"); - return new ModifiedByImpl(id, type, clientId, anonymousId, customer, associate, isPlatformClient); + Objects.requireNonNull(type, ModifiedBy.class + ": type is missing"); + return new ModifiedByImpl(isPlatformClient, id, type, clientId, anonymousId, customer, associate); } /** @@ -270,7 +270,7 @@ public ModifiedBy build() { * @return ModifiedBy */ public ModifiedBy buildUnchecked() { - return new ModifiedByImpl(id, type, clientId, anonymousId, customer, associate, isPlatformClient); + return new ModifiedByImpl(isPlatformClient, id, type, clientId, anonymousId, customer, associate); } /** @@ -288,13 +288,13 @@ public static ModifiedByBuilder of() { */ public static ModifiedByBuilder of(final ModifiedBy template) { ModifiedByBuilder builder = new ModifiedByBuilder(); + builder.isPlatformClient = template.getIsPlatformClient(); builder.id = template.getId(); builder.type = template.getType(); builder.clientId = template.getClientId(); builder.anonymousId = template.getAnonymousId(); builder.customer = template.getCustomer(); builder.associate = template.getAssociate(); - builder.isPlatformClient = template.getIsPlatformClient(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByImpl.java index 6c7d3542efe..e5865c48f9f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByImpl.java @@ -22,6 +22,8 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ModifiedByImpl implements ModifiedBy, ModelBase { + private Boolean isPlatformClient; + private String id; private String type; @@ -34,24 +36,22 @@ public class ModifiedByImpl implements ModifiedBy, ModelBase { private com.commercetools.history.models.common.Reference associate; - private Boolean isPlatformClient; - /** * create instance with all properties */ @JsonCreator - ModifiedByImpl(@JsonProperty("id") final String id, @JsonProperty("type") final String type, + ModifiedByImpl(@JsonProperty("isPlatformClient") final Boolean isPlatformClient, + @JsonProperty("id") final String id, @JsonProperty("type") final String type, @JsonProperty("clientId") final String clientId, @JsonProperty("anonymousId") final String anonymousId, @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer, - @JsonProperty("associate") final com.commercetools.history.models.common.Reference associate, - @JsonProperty("isPlatformClient") final Boolean isPlatformClient) { + @JsonProperty("associate") final com.commercetools.history.models.common.Reference associate) { + this.isPlatformClient = isPlatformClient; this.id = id; this.type = type; this.clientId = clientId; this.anonymousId = anonymousId; this.customer = customer; this.associate = associate; - this.isPlatformClient = isPlatformClient; } /** @@ -60,9 +60,17 @@ public class ModifiedByImpl implements ModifiedBy, ModelBase { public ModifiedByImpl() { } + /** + *

true if the change was made using the Merchant Center or ImpEx.

+ */ + + public Boolean getIsPlatformClient() { + return this.isPlatformClient; + } + /** *

ID of the Merchant Center user who made the change.

- *

Present only if the change was made in the Merchant Center.

+ *

Present only if isPlatformClient is true.

*/ public String getId() { @@ -116,12 +124,8 @@ public com.commercetools.history.models.common.Reference getAssociate() { return this.associate; } - /** - *

true if the change was made using the Merchant Center or ImpEx.

- */ - - public Boolean getIsPlatformClient() { - return this.isPlatformClient; + public void setIsPlatformClient(final Boolean isPlatformClient) { + this.isPlatformClient = isPlatformClient; } public void setId(final String id) { @@ -148,10 +152,6 @@ public void setAssociate(final com.commercetools.history.models.common.Reference this.associate = associate; } - public void setIsPlatformClient(final Boolean isPlatformClient) { - this.isPlatformClient = isPlatformClient; - } - @Override public boolean equals(Object o) { if (this == o) @@ -162,7 +162,8 @@ public boolean equals(Object o) { ModifiedByImpl that = (ModifiedByImpl) o; - return new EqualsBuilder().append(id, that.id) + return new EqualsBuilder().append(isPlatformClient, that.isPlatformClient) + .append(id, that.id) .append(type, that.type) .append(clientId, that.clientId) .append(anonymousId, that.anonymousId) @@ -175,31 +176,30 @@ public boolean equals(Object o) { .append(anonymousId, that.anonymousId) .append(customer, that.customer) .append(associate, that.associate) - .append(isPlatformClient, that.isPlatformClient) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(id) + return new HashCodeBuilder(17, 37).append(isPlatformClient) + .append(id) .append(type) .append(clientId) .append(anonymousId) .append(customer) .append(associate) - .append(isPlatformClient) .toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("isPlatformClient", isPlatformClient) + .append("id", id) .append("type", type) .append("clientId", clientId) .append("anonymousId", anonymousId) .append("customer", customer) .append("associate", associate) - .append("isPlatformClient", isPlatformClient) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change_history/ModifiedByTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change_history/ModifiedByTest.java index a0a30d7c96e..c8d2d40397a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change_history/ModifiedByTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change_history/ModifiedByTest.java @@ -24,15 +24,21 @@ public void buildUnchecked(ModifiedByBuilder builder) { @DataProvider public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ModifiedBy.builder().id("id") }, - new Object[] { ModifiedBy.builder().type("type") }, + return new Object[][] { new Object[] { ModifiedBy.builder().isPlatformClient(true) }, + new Object[] { ModifiedBy.builder().id("id") }, new Object[] { ModifiedBy.builder().type("type") }, new Object[] { ModifiedBy.builder().clientId("clientId") }, new Object[] { ModifiedBy.builder().anonymousId("anonymousId") }, new Object[] { ModifiedBy.builder().customer(new com.commercetools.history.models.common.ReferenceImpl()) }, new Object[] { - ModifiedBy.builder().associate(new com.commercetools.history.models.common.ReferenceImpl()) }, - new Object[] { ModifiedBy.builder().isPlatformClient(true) } }; + ModifiedBy.builder().associate(new com.commercetools.history.models.common.ReferenceImpl()) } }; + } + + @Test + public void isPlatformClient() { + ModifiedBy value = ModifiedBy.of(); + value.setIsPlatformClient(true); + Assertions.assertThat(value.getIsPlatformClient()).isEqualTo(true); } @Test @@ -78,11 +84,4 @@ public void associate() { Assertions.assertThat(value.getAssociate()) .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); } - - @Test - public void isPlatformClient() { - ModifiedBy value = ModifiedBy.of(); - value.setIsPlatformClient(true); - Assertions.assertThat(value.getIsPlatformClient()).isEqualTo(true); - } } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java index bc9444d996d..31af28ae7ed 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java @@ -46,6 +46,7 @@ @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidScopeErrorImpl.class, name = InvalidScopeError.INVALID_SCOPE), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidStateTransitionErrorImpl.class, name = InvalidStateTransitionError.INVALID_TRANSITION), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidTokenErrorImpl.class, name = InvalidTokenError.INVALID_TOKEN), + @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedErrorImpl.class, name = NewMasterVariantAdditionNotAllowedError.NEW_MASTER_VARIANT_ADDITION_NOT_ALLOWED), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.ReferencedResourceNotFoundImpl.class, name = ReferencedResourceNotFound.REFERENCED_RESOURCE_NOT_FOUND), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.RequiredFieldErrorImpl.class, name = RequiredFieldError.REQUIRED_FIELD), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.ResourceCreationErrorImpl.class, name = ResourceCreationError.RESOURCE_CREATION), @@ -162,6 +163,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) { return com.commercetools.importapi.models.errors.InvalidTokenError .deepCopy((com.commercetools.importapi.models.errors.InvalidTokenError) template); } + if (template instanceof com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedError) { + return com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedError.deepCopy( + (com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedError) template); + } if (template instanceof com.commercetools.importapi.models.errors.ReferencedResourceNotFound) { return com.commercetools.importapi.models.errors.ReferencedResourceNotFound .deepCopy((com.commercetools.importapi.models.errors.ReferencedResourceNotFound) template); @@ -335,6 +340,14 @@ public static com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder return com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder.of(); } + /** + * builder for newMasterVariantAdditionNotAllowed subtype + * @return builder + */ + public static com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedErrorBuilder newMasterVariantAdditionNotAllowedBuilder() { + return com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedErrorBuilder.of(); + } + /** * builder for referencedResourceNotFound subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java index 1953b8c7bbf..455c2fd58e7 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java @@ -83,6 +83,10 @@ public com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder invali return com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder.of(); } + public com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedErrorBuilder newMasterVariantAdditionNotAllowedBuilder() { + return com.commercetools.importapi.models.errors.NewMasterVariantAdditionNotAllowedErrorBuilder.of(); + } + public com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder referencedResourceNotFoundBuilder() { return com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedError.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedError.java new file mode 100644 index 00000000000..8a2529c74f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedError.java @@ -0,0 +1,130 @@ + +package com.commercetools.importapi.models.errors; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when attempting to create a ProductVariant and set it as the Master Variant in the same ProductVariantImport.

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

+ *     NewMasterVariantAdditionNotAllowedError newMasterVariantAdditionNotAllowedError = NewMasterVariantAdditionNotAllowedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = NewMasterVariantAdditionNotAllowedErrorImpl.class) +public interface NewMasterVariantAdditionNotAllowedError extends ErrorObject { + + /** + * discriminator value for NewMasterVariantAdditionNotAllowedError + */ + String NEW_MASTER_VARIANT_ADDITION_NOT_ALLOWED = "NewMasterVariantAdditionNotAllowed"; + + /** + *

"Adding a new variant as master variant is not allowed."

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

"Adding a new variant as master variant is not allowed."

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of NewMasterVariantAdditionNotAllowedError + */ + public static NewMasterVariantAdditionNotAllowedError of() { + return new NewMasterVariantAdditionNotAllowedErrorImpl(); + } + + /** + * factory method to create a shallow copy NewMasterVariantAdditionNotAllowedError + * @param template instance to be copied + * @return copy instance + */ + public static NewMasterVariantAdditionNotAllowedError of(final NewMasterVariantAdditionNotAllowedError template) { + NewMasterVariantAdditionNotAllowedErrorImpl instance = new NewMasterVariantAdditionNotAllowedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * factory method to create a deep copy of NewMasterVariantAdditionNotAllowedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static NewMasterVariantAdditionNotAllowedError deepCopy( + @Nullable final NewMasterVariantAdditionNotAllowedError template) { + if (template == null) { + return null; + } + NewMasterVariantAdditionNotAllowedErrorImpl instance = new NewMasterVariantAdditionNotAllowedErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for NewMasterVariantAdditionNotAllowedError + * @return builder + */ + public static NewMasterVariantAdditionNotAllowedErrorBuilder builder() { + return NewMasterVariantAdditionNotAllowedErrorBuilder.of(); + } + + /** + * create builder for NewMasterVariantAdditionNotAllowedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static NewMasterVariantAdditionNotAllowedErrorBuilder builder( + final NewMasterVariantAdditionNotAllowedError template) { + return NewMasterVariantAdditionNotAllowedErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withNewMasterVariantAdditionNotAllowedError( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.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/errors/NewMasterVariantAdditionNotAllowedErrorBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedErrorBuilder.java new file mode 100644 index 00000000000..751454aed1b --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedErrorBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.importapi.models.errors; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * NewMasterVariantAdditionNotAllowedErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

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

"Adding a new variant as master variant is not allowed."

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

"Adding a new variant as master variant is not allowed."

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

Returned when attempting to create a ProductVariant and set it as the Master Variant in the same ProductVariantImport.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class NewMasterVariantAdditionNotAllowedErrorImpl implements NewMasterVariantAdditionNotAllowedError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + NewMasterVariantAdditionNotAllowedErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = NEW_MASTER_VARIANT_ADDITION_NOT_ALLOWED; + } + + /** + * create empty instance + */ + public NewMasterVariantAdditionNotAllowedErrorImpl() { + this.code = NEW_MASTER_VARIANT_ADDITION_NOT_ALLOWED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Adding a new variant as master variant is not allowed."

+ */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + NewMasterVariantAdditionNotAllowedErrorImpl that = (NewMasterVariantAdditionNotAllowedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImport.java index 065f7880e79..d85068a657b 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImport.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImport.java @@ -56,7 +56,10 @@ public interface ProductVariantImport extends ImportResource { public String getSku(); /** - *

Maps to ProductVariant.isMasterVariant.

+ *
    + *
  • When creating a new ProductVariant, set to false; otherwise, the import operation will fail with a NewMasterVariantAdditionNotAllowed error.
  • + *
  • Set to true if the ProductVariant exists and you want to set this ProductVariant as the Master Variant.
  • + *
* @return isMasterVariant */ @NotNull @@ -122,7 +125,10 @@ public interface ProductVariantImport extends ImportResource { public void setSku(final String sku); /** - *

Maps to ProductVariant.isMasterVariant.

+ *
    + *
  • When creating a new ProductVariant, set to false; otherwise, the import operation will fail with a NewMasterVariantAdditionNotAllowed error.
  • + *
  • Set to true if the ProductVariant exists and you want to set this ProductVariant as the Master Variant.
  • + *
* @param isMasterVariant value to be set */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportBuilder.java index c90204ffb6d..9427e89f61d 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportBuilder.java @@ -70,7 +70,10 @@ public ProductVariantImportBuilder sku(@Nullable final String sku) { } /** - *

Maps to ProductVariant.isMasterVariant.

+ *
    + *
  • When creating a new ProductVariant, set to false; otherwise, the import operation will fail with a NewMasterVariantAdditionNotAllowed error.
  • + *
  • Set to true if the ProductVariant exists and you want to set this ProductVariant as the Master Variant.
  • + *
* @param isMasterVariant value to be set * @return Builder */ @@ -397,7 +400,10 @@ public String getSku() { } /** - *

Maps to ProductVariant.isMasterVariant.

+ *
    + *
  • When creating a new ProductVariant, set to false; otherwise, the import operation will fail with a NewMasterVariantAdditionNotAllowed error.
  • + *
  • Set to true if the ProductVariant exists and you want to set this ProductVariant as the Master Variant.
  • + *
* @return isMasterVariant */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportImpl.java index 4a6b98aedb8..b1320f869e5 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/productvariants/ProductVariantImportImpl.java @@ -82,7 +82,10 @@ public String getSku() { } /** - *

Maps to ProductVariant.isMasterVariant.

+ *
    + *
  • When creating a new ProductVariant, set to false; otherwise, the import operation will fail with a NewMasterVariantAdditionNotAllowed error.
  • + *
  • Set to true if the ProductVariant exists and you want to set this ProductVariant as the Master Variant.
  • + *
*/ public Boolean getIsMasterVariant() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedErrorTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedErrorTest.java new file mode 100644 index 00000000000..ab77ff88b5b --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/NewMasterVariantAdditionNotAllowedErrorTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.importapi.models.errors; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class NewMasterVariantAdditionNotAllowedErrorTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(NewMasterVariantAdditionNotAllowedErrorBuilder builder) { + NewMasterVariantAdditionNotAllowedError newMasterVariantAdditionNotAllowedError = builder.buildUnchecked(); + Assertions.assertThat(newMasterVariantAdditionNotAllowedError) + .isInstanceOf(NewMasterVariantAdditionNotAllowedError.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { NewMasterVariantAdditionNotAllowedError.builder().message("message") } }; + } + + @Test + public void message() { + NewMasterVariantAdditionNotAllowedError value = NewMasterVariantAdditionNotAllowedError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/references.txt b/references.txt index c82b4964717..649f0db4317 100644 --- a/references.txt +++ b/references.txt @@ -313,3 +313,12 @@ c77ec902f368c2c31505fcb65a835ce148350077 4d99474bc43b90f392085d18a75bb826c4cb25e0 e985f4b7aa55610705ee49bd3eb645c2fd03eb6c 3bde1efd0d5dbff77065d355e9d00e8a0e8f466a +c27603f949e869148570ebb8bd3ec6db34a985b7 +cac013ef26a2c100979f66df86f605953dd5d736 +82bca33a98d14907ea79e2cca281625dd82cdf0d +c8c2455221baca20421082b7715eaa0a712af7f1 +8e5c10a0c61ddaa5eabbd15344258f53ce6971ee +71b6bfba97b7019e0ba081bb188e43c90c6d79e8 +41774e015e4f946bd57f0e2dc76522ed757860c4 +1406d1e9ac4945b1179cfce2a956a39f67b757a9 +d410bad973f2fe90ea8239c4cb586fe0cfc13856