diff --git a/changes.md b/changes.md
index 7bb47ed89e..9ddeb16fa8 100644
--- a/changes.md
+++ b/changes.md
@@ -1,46 +1,10 @@
**Api changes**
Added Property(s)
-
-- added property `approvalRuleMode` to type `BusinessUnit`
-- added property `approvalRuleMode` to type `BusinessUnitDraft`
-- added property `approvalRuleMode` to type `Company`
-- added property `approvalRuleMode` to type `CompanyDraft`
-- added property `approvalRuleMode` to type `Division`
-- added property `approvalRuleMode` to type `DivisionDraft`
-- added property `metaTitle` to type `ProductTailoringCreatedMessage`
-- added property `metaDescription` to type `ProductTailoringCreatedMessage`
-- added property `metaKeywords` to type `ProductTailoringCreatedMessage`
-- added property `variants` to type `ProductTailoringCreatedMessage`
-- added property `metaTitle` to type `ProductTailoringCreatedMessagePayload`
-- added property `metaDescription` to type `ProductTailoringCreatedMessagePayload`
-- added property `metaKeywords` to type `ProductTailoringCreatedMessagePayload`
-- added property `variants` to type `ProductTailoringCreatedMessagePayload`
-- added property `variants` to type `ProductTailoringData`
-- added property `variants` to type `ProductTailoringDraft`
-- added property `variants` to type `ProductTailoringInStoreDraft`
-- added property `store` to type `StagedQuote`
-Added Resource(s)
+Added Enum(s)
-- added resource `/{projectKey}/customers/search`
-- added resource `/{projectKey}/customers/search/indexing-status`
-- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
-- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
-- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
-- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes`
-- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images`
-- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images`
-- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}`
-- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}`
-- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}`
-- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}`
-- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}`
-- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}`
+- added enum `attribute-group` to type `ChangeSubscriptionResourceTypeId`
+- added enum `product-tailoring` to type `ChangeSubscriptionResourceTypeId`
Added Enum(s)
-
-- added enum `attribute-group` to type `ChangeSubscriptionResourceTypeId`
-- added enum `product-tailoring` to type `ChangeSubscriptionResourceTypeId`
-Added Method(s)
@@ -104,6 +60,30 @@
Added Property(s)
+
+- added property `approvalRuleMode` to type `BusinessUnit`
+- added property `approvalRuleMode` to type `BusinessUnitDraft`
+- added property `approvalRuleMode` to type `Company`
+- added property `approvalRuleMode` to type `CompanyDraft`
+- added property `approvalRuleMode` to type `Division`
+- added property `approvalRuleMode` to type `DivisionDraft`
+- added property `metaTitle` to type `ProductTailoringCreatedMessage`
+- added property `metaDescription` to type `ProductTailoringCreatedMessage`
+- added property `metaKeywords` to type `ProductTailoringCreatedMessage`
+- added property `variants` to type `ProductTailoringCreatedMessage`
+- added property `metaTitle` to type `ProductTailoringCreatedMessagePayload`
+- added property `metaDescription` to type `ProductTailoringCreatedMessagePayload`
+- added property `metaKeywords` to type `ProductTailoringCreatedMessagePayload`
+- added property `variants` to type `ProductTailoringCreatedMessagePayload`
+- added property `variants` to type `ProductTailoringData`
+- added property `variants` to type `ProductTailoringDraft`
+- added property `variants` to type `ProductTailoringInStoreDraft`
+- added property `store` to type `StagedQuote`
+Added Type(s)
@@ -116,11 +96,21 @@
- added type `CustomerSearchRequest`
- added type `CustomerSearchResult`
- added type `BusinessUnitApprovalRuleModeChangedMessage`
+- added type `ProductPriceCustomFieldAddedMessage`
+- added type `ProductPriceCustomFieldChangedMessage`
+- added type `ProductPriceCustomFieldRemovedMessage`
+- added type `ProductPriceCustomFieldsRemovedMessage`
+- added type `ProductPriceCustomFieldsSetMessage`
- added type `ProductTailoringImageAddedMessage`
- added type `ProductTailoringImagesSetMessage`
- added type `ProductVariantTailoringAddedMessage`
- added type `ProductVariantTailoringRemovedMessage`
- added type `BusinessUnitApprovalRuleModeChangedMessagePayload`
+- added type `ProductPriceCustomFieldAddedMessagePayload`
+- added type `ProductPriceCustomFieldChangedMessagePayload`
+- added type `ProductPriceCustomFieldRemovedMessagePayload`
+- added type `ProductPriceCustomFieldsRemovedMessagePayload`
+- added type `ProductPriceCustomFieldsSetMessagePayload`
- added type `ProductTailoringImageAddedMessagePayload`
- added type `ProductTailoringImagesSetMessagePayload`
- added type `ProductVariantTailoringAddedMessagePayload`
@@ -162,3 +152,23 @@
- :warning: removed query parameter `localeProjection` from method `delete /{projectKey}/products/{ID}`
Added Resource(s)
+
+- added resource `/{projectKey}/customers/search`
+- added resource `/{projectKey}/customers/search/indexing-status`
+- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
+- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
+- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
+- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes`
+- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images`
+- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images`
+- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}`
+- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}`
+- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}`
+- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}`
+- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}`
+- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}`
+
Generated after adding a Custom Field to a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldAddedMessage productPriceCustomFieldAddedMessage = ProductPriceCustomFieldAddedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price to which the Custom Field was added.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was added.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *Unique identifier of the Price to which the Custom Field was added.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was added.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + *The added CustomFieldValue based on the FieldType.
+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldAddedMessage + */ + public static ProductPriceCustomFieldAddedMessage of() { + return new ProductPriceCustomFieldAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldAddedMessage of(final ProductPriceCustomFieldAddedMessage template) { + ProductPriceCustomFieldAddedMessageImpl instance = new ProductPriceCustomFieldAddedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldAddedMessage deepCopy( + @Nullable final ProductPriceCustomFieldAddedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldAddedMessageImpl instance = new ProductPriceCustomFieldAddedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldAddedMessage + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder builder() { + return ProductPriceCustomFieldAddedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder builder( + final ProductPriceCustomFieldAddedMessage template) { + return ProductPriceCustomFieldAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldAddedMessage productPriceCustomFieldAddedMessage = ProductPriceCustomFieldAddedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder lastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder withLastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *IDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder createdBy( + FunctionIDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder withCreatedBy( + FunctionIDs and references that created the Message.
+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price to which the Custom Field was added.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was added.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price to which the Custom Field was added.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was added.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldAddedMessage with checking for non-null required values + * @return ProductPriceCustomFieldAddedMessage + */ + public ProductPriceCustomFieldAddedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldAddedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldAddedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldAddedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldAddedMessage.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldAddedMessage.class + ": value is missing"); + return new ProductPriceCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * builds ProductPriceCustomFieldAddedMessage without checking for non-null required values + * @return ProductPriceCustomFieldAddedMessage + */ + public ProductPriceCustomFieldAddedMessage buildUnchecked() { + return new ProductPriceCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldAddedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder of() { + return new ProductPriceCustomFieldAddedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder of(final ProductPriceCustomFieldAddedMessage template) { + ProductPriceCustomFieldAddedMessageBuilder builder = new ProductPriceCustomFieldAddedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + 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/message/ProductPriceCustomFieldAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageImpl.java new file mode 100644 index 0000000000..130a2aea31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageImpl.java @@ -0,0 +1,375 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after adding a Custom Field to a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessageImpl implements ProductPriceCustomFieldAddedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldAddedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldAddedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price to which the Custom Field was added.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was added.
+ */ + + public String getName() { + return this.name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + 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; + + ProductPriceCustomFieldAddedMessageImpl that = (ProductPriceCustomFieldAddedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java new file mode 100644 index 0000000000..85caba4e70 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java @@ -0,0 +1,202 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after adding a Custom Field to a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldAddedMessagePayload productPriceCustomFieldAddedMessagePayload = ProductPriceCustomFieldAddedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price to which the Custom Field was added.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was added.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *Unique identifier of the Price to which the Custom Field was added.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was added.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + *The added CustomFieldValue based on the FieldType.
+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldAddedMessagePayload + */ + public static ProductPriceCustomFieldAddedMessagePayload of() { + return new ProductPriceCustomFieldAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldAddedMessagePayload of( + final ProductPriceCustomFieldAddedMessagePayload template) { + ProductPriceCustomFieldAddedMessagePayloadImpl instance = new ProductPriceCustomFieldAddedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldAddedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldAddedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldAddedMessagePayloadImpl instance = new ProductPriceCustomFieldAddedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldAddedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder builder( + final ProductPriceCustomFieldAddedMessagePayload template) { + return ProductPriceCustomFieldAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldAddedMessagePayload productPriceCustomFieldAddedMessagePayload = ProductPriceCustomFieldAddedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price to which the Custom Field was added.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was added.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *Unique identifier of the Price to which the Custom Field was added.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was added.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldAddedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldAddedMessagePayload + */ + public ProductPriceCustomFieldAddedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldAddedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldAddedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldAddedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldAddedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldAddedMessagePayload.class + ": value is missing"); + return new ProductPriceCustomFieldAddedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * builds ProductPriceCustomFieldAddedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldAddedMessagePayload + */ + public ProductPriceCustomFieldAddedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldAddedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldAddedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldAddedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder of( + final ProductPriceCustomFieldAddedMessagePayload template) { + ProductPriceCustomFieldAddedMessagePayloadBuilder builder = new ProductPriceCustomFieldAddedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + 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/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java new file mode 100644 index 0000000000..1894579b2e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java @@ -0,0 +1,175 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after adding a Custom Field to a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessagePayloadImpl + implements ProductPriceCustomFieldAddedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldAddedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldAddedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *Unique identifier of the Price to which the Custom Field was added.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was added.
+ */ + + public String getName() { + return this.name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + 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; + + ProductPriceCustomFieldAddedMessagePayloadImpl that = (ProductPriceCustomFieldAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java new file mode 100644 index 0000000000..fc711b67ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java @@ -0,0 +1,229 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldChangedMessage productPriceCustomFieldChangedMessage = ProductPriceCustomFieldChangedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price of which the Custom Field was changed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was changed.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *Unique identifier of the Price of which the Custom Field was changed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was changed.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldChangedMessage + */ + public static ProductPriceCustomFieldChangedMessage of() { + return new ProductPriceCustomFieldChangedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldChangedMessage of(final ProductPriceCustomFieldChangedMessage template) { + ProductPriceCustomFieldChangedMessageImpl instance = new ProductPriceCustomFieldChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldChangedMessage deepCopy( + @Nullable final ProductPriceCustomFieldChangedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldChangedMessageImpl instance = new ProductPriceCustomFieldChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldChangedMessage + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder builder() { + return ProductPriceCustomFieldChangedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder builder( + final ProductPriceCustomFieldChangedMessage template) { + return ProductPriceCustomFieldChangedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldChangedMessage productPriceCustomFieldChangedMessage = ProductPriceCustomFieldChangedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder lastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder withLastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *IDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder createdBy( + FunctionIDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder withCreatedBy( + FunctionIDs and references that created the Message.
+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price of which the Custom Field was changed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was changed.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price of which the Custom Field was changed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was changed.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldChangedMessage with checking for non-null required values + * @return ProductPriceCustomFieldChangedMessage + */ + public ProductPriceCustomFieldChangedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldChangedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldChangedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldChangedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldChangedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldChangedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldChangedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldChangedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldChangedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldChangedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldChangedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldChangedMessage.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldChangedMessage.class + ": value is missing"); + return new ProductPriceCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * builds ProductPriceCustomFieldChangedMessage without checking for non-null required values + * @return ProductPriceCustomFieldChangedMessage + */ + public ProductPriceCustomFieldChangedMessage buildUnchecked() { + return new ProductPriceCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldChangedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder of() { + return new ProductPriceCustomFieldChangedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder of( + final ProductPriceCustomFieldChangedMessage template) { + ProductPriceCustomFieldChangedMessageBuilder builder = new ProductPriceCustomFieldChangedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + 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/message/ProductPriceCustomFieldChangedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageImpl.java new file mode 100644 index 0000000000..a0471ff52c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageImpl.java @@ -0,0 +1,375 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessageImpl implements ProductPriceCustomFieldChangedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldChangedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldChangedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price of which the Custom Field was changed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was changed.
+ */ + + public String getName() { + return this.name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + 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; + + ProductPriceCustomFieldChangedMessageImpl that = (ProductPriceCustomFieldChangedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java new file mode 100644 index 0000000000..d6042574f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java @@ -0,0 +1,202 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldChangedMessagePayload productPriceCustomFieldChangedMessagePayload = ProductPriceCustomFieldChangedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price of which the Custom Field was changed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was changed.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *Unique identifier of the Price of which the Custom Field was changed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was changed.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldChangedMessagePayload + */ + public static ProductPriceCustomFieldChangedMessagePayload of() { + return new ProductPriceCustomFieldChangedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldChangedMessagePayload of( + final ProductPriceCustomFieldChangedMessagePayload template) { + ProductPriceCustomFieldChangedMessagePayloadImpl instance = new ProductPriceCustomFieldChangedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldChangedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldChangedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldChangedMessagePayloadImpl instance = new ProductPriceCustomFieldChangedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldChangedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldChangedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder builder( + final ProductPriceCustomFieldChangedMessagePayload template) { + return ProductPriceCustomFieldChangedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldChangedMessagePayload productPriceCustomFieldChangedMessagePayload = ProductPriceCustomFieldChangedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price of which the Custom Field was changed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was changed.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *Unique identifier of the Price of which the Custom Field was changed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was changed.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldChangedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldChangedMessagePayload + */ + public ProductPriceCustomFieldChangedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldChangedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldChangedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldChangedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldChangedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldChangedMessagePayload.class + ": value is missing"); + return new ProductPriceCustomFieldChangedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * builds ProductPriceCustomFieldChangedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldChangedMessagePayload + */ + public ProductPriceCustomFieldChangedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldChangedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldChangedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldChangedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder of( + final ProductPriceCustomFieldChangedMessagePayload template) { + ProductPriceCustomFieldChangedMessagePayloadBuilder builder = new ProductPriceCustomFieldChangedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + 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/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java new file mode 100644 index 0000000000..063c4abe79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java @@ -0,0 +1,175 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessagePayloadImpl + implements ProductPriceCustomFieldChangedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldChangedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldChangedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *Unique identifier of the Price of which the Custom Field was changed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was changed.
+ */ + + public String getName() { + return this.name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Price CustomField update action.
+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + 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; + + ProductPriceCustomFieldChangedMessagePayloadImpl that = (ProductPriceCustomFieldChangedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java new file mode 100644 index 0000000000..5cbb226563 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java @@ -0,0 +1,212 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after removing a Custom Field from a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldRemovedMessage productPriceCustomFieldRemovedMessage = ProductPriceCustomFieldRemovedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Field was removed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was removed.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *Unique identifier of the Price from which the Custom Field was removed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was removed.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of ProductPriceCustomFieldRemovedMessage + */ + public static ProductPriceCustomFieldRemovedMessage of() { + return new ProductPriceCustomFieldRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldRemovedMessage of(final ProductPriceCustomFieldRemovedMessage template) { + ProductPriceCustomFieldRemovedMessageImpl instance = new ProductPriceCustomFieldRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldRemovedMessage deepCopy( + @Nullable final ProductPriceCustomFieldRemovedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldRemovedMessageImpl instance = new ProductPriceCustomFieldRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldRemovedMessage + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder builder() { + return ProductPriceCustomFieldRemovedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder builder( + final ProductPriceCustomFieldRemovedMessage template) { + return ProductPriceCustomFieldRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldRemovedMessage productPriceCustomFieldRemovedMessage = ProductPriceCustomFieldRemovedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder lastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder withLastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *IDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder createdBy( + FunctionIDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder withCreatedBy( + FunctionIDs and references that created the Message.
+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Field was removed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was removed.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Field was removed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was removed.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds ProductPriceCustomFieldRemovedMessage with checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessage + */ + public ProductPriceCustomFieldRemovedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldRemovedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldRemovedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldRemovedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldRemovedMessage.class + ": name is missing"); + return new ProductPriceCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name); + } + + /** + * builds ProductPriceCustomFieldRemovedMessage without checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessage + */ + public ProductPriceCustomFieldRemovedMessage buildUnchecked() { + return new ProductPriceCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name); + } + + /** + * factory method for an instance of ProductPriceCustomFieldRemovedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder of() { + return new ProductPriceCustomFieldRemovedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder of( + final ProductPriceCustomFieldRemovedMessage template) { + ProductPriceCustomFieldRemovedMessageBuilder builder = new ProductPriceCustomFieldRemovedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java new file mode 100644 index 0000000000..a9fe19cb2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java @@ -0,0 +1,355 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after removing a Custom Field from a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessageImpl implements ProductPriceCustomFieldRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldRemovedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldRemovedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Field was removed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was removed.
+ */ + + public String getName() { + return this.name; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldRemovedMessageImpl that = (ProductPriceCustomFieldRemovedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java new file mode 100644 index 0000000000..ec29aebaaa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after removing a Custom Field from a Price using the Set Price CustomField update action.
+ * + *
+ * ProductPriceCustomFieldRemovedMessagePayload productPriceCustomFieldRemovedMessagePayload = ProductPriceCustomFieldRemovedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Field was removed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Name of the Custom Field that was removed.
+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *Unique identifier of the Price from which the Custom Field was removed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Name of the Custom Field that was removed.
+ * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of ProductPriceCustomFieldRemovedMessagePayload + */ + public static ProductPriceCustomFieldRemovedMessagePayload of() { + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldRemovedMessagePayload of( + final ProductPriceCustomFieldRemovedMessagePayload template) { + ProductPriceCustomFieldRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldRemovedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldRemovedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldRemovedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder builder( + final ProductPriceCustomFieldRemovedMessagePayload template) { + return ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldRemovedMessagePayload productPriceCustomFieldRemovedMessagePayload = ProductPriceCustomFieldRemovedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .name("{name}")
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Field was removed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Name of the Custom Field that was removed.
+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *Unique identifier of the Price from which the Custom Field was removed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was removed.
+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds ProductPriceCustomFieldRemovedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessagePayload + */ + public ProductPriceCustomFieldRemovedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldRemovedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldRemovedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldRemovedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldRemovedMessagePayload.class + ": name is missing"); + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(priceId, variantId, staged, name); + } + + /** + * builds ProductPriceCustomFieldRemovedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessagePayload + */ + public ProductPriceCustomFieldRemovedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(priceId, variantId, staged, name); + } + + /** + * factory method for an instance of ProductPriceCustomFieldRemovedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder of( + final ProductPriceCustomFieldRemovedMessagePayload template) { + ProductPriceCustomFieldRemovedMessagePayloadBuilder builder = new ProductPriceCustomFieldRemovedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java new file mode 100644 index 0000000000..fd8d48b0a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java @@ -0,0 +1,156 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after removing a Custom Field from a Price using the Set Price CustomField update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessagePayloadImpl + implements ProductPriceCustomFieldRemovedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldRemovedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldRemovedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *Unique identifier of the Price from which the Custom Field was removed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Name of the Custom Field that was removed.
+ */ + + public String getName() { + return this.name; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldRemovedMessagePayloadImpl that = (ProductPriceCustomFieldRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java new file mode 100644 index 0000000000..2e6e0ca70e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.
+ * + *
+ * ProductPriceCustomFieldsRemovedMessage productPriceCustomFieldsRemovedMessage = ProductPriceCustomFieldsRemovedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Type was removed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Unique identifier of the Price from which the Custom Type was removed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsRemovedMessage + */ + public static ProductPriceCustomFieldsRemovedMessage of() { + return new ProductPriceCustomFieldsRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsRemovedMessage of(final ProductPriceCustomFieldsRemovedMessage template) { + ProductPriceCustomFieldsRemovedMessageImpl instance = new ProductPriceCustomFieldsRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsRemovedMessage deepCopy( + @Nullable final ProductPriceCustomFieldsRemovedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsRemovedMessageImpl instance = new ProductPriceCustomFieldsRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsRemovedMessage + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder builder() { + return ProductPriceCustomFieldsRemovedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder builder( + final ProductPriceCustomFieldsRemovedMessage template) { + return ProductPriceCustomFieldsRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldsRemovedMessage productPriceCustomFieldsRemovedMessage = ProductPriceCustomFieldsRemovedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder lastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder withLastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *IDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder createdBy( + FunctionIDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder withCreatedBy( + FunctionIDs and references that created the Message.
+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Type was removed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Type was removed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductPriceCustomFieldsRemovedMessage with checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessage + */ + public ProductPriceCustomFieldsRemovedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldsRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldsRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldsRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldsRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldsRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldsRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldsRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldsRemovedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldsRemovedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsRemovedMessage.class + ": staged is missing"); + return new ProductPriceCustomFieldsRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged); + } + + /** + * builds ProductPriceCustomFieldsRemovedMessage without checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessage + */ + public ProductPriceCustomFieldsRemovedMessage buildUnchecked() { + return new ProductPriceCustomFieldsRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsRemovedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder of() { + return new ProductPriceCustomFieldsRemovedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder of( + final ProductPriceCustomFieldsRemovedMessage template) { + ProductPriceCustomFieldsRemovedMessageBuilder builder = new ProductPriceCustomFieldsRemovedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java new file mode 100644 index 0000000000..cfe51ca908 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java @@ -0,0 +1,336 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessageImpl implements ProductPriceCustomFieldsRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsRemovedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsRemovedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price from which the Custom Type was removed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsRemovedMessageImpl that = (ProductPriceCustomFieldsRemovedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(priceId) + .append(variantId) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java new file mode 100644 index 0000000000..5c966eab68 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.
+ * + *
+ * ProductPriceCustomFieldsRemovedMessagePayload productPriceCustomFieldsRemovedMessagePayload = ProductPriceCustomFieldsRemovedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Type was removed.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Unique identifier of the Price from which the Custom Type was removed.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsRemovedMessagePayload + */ + public static ProductPriceCustomFieldsRemovedMessagePayload of() { + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsRemovedMessagePayload of( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + ProductPriceCustomFieldsRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsRemovedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldsRemovedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsRemovedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + return ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProductPriceCustomFieldsRemovedMessagePayload productPriceCustomFieldsRemovedMessagePayload = ProductPriceCustomFieldsRemovedMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .build()
+ *
+ * Unique identifier of the Price from which the Custom Type was removed.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessagePayloadBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Unique identifier of the Price from which the Custom Type was removed.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductPriceCustomFieldsRemovedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessagePayload + */ + public ProductPriceCustomFieldsRemovedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldsRemovedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldsRemovedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsRemovedMessagePayload.class + ": staged is missing"); + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(priceId, variantId, staged); + } + + /** + * builds ProductPriceCustomFieldsRemovedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessagePayload + */ + public ProductPriceCustomFieldsRemovedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(priceId, variantId, staged); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsRemovedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldsRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder of( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder = new ProductPriceCustomFieldsRemovedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java new file mode 100644 index 0000000000..f263f72ed2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessagePayloadImpl + implements ProductPriceCustomFieldsRemovedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsRemovedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsRemovedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *Unique identifier of the Price from which the Custom Type was removed.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsRemovedMessagePayloadImpl that = (ProductPriceCustomFieldsRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(priceId).append(variantId).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java new file mode 100644 index 0000000000..b999357602 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java @@ -0,0 +1,231 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *Generated after a successful Set Price Custom Type update action.
+ * + *
+ * ProductPriceCustomFieldsSetMessage productPriceCustomFieldsSetMessage = ProductPriceCustomFieldsSetMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .customField(customFieldBuilder -> customFieldBuilder)
+ * .build()
+ *
+ * Unique identifier of the Price on which the Custom Type was set.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Custom Fields that were set.
+ * @return customField + */ + @NotNull + @Valid + @JsonProperty("customField") + public CustomFields getCustomField(); + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Unique identifier of the Price on which the Custom Type was set.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Custom Fields that were set.
+ * @param customField value to be set + */ + + public void setCustomField(final CustomFields customField); + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
+ * ProductPriceCustomFieldsSetMessage productPriceCustomFieldsSetMessage = ProductPriceCustomFieldsSetMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .customField(customFieldBuilder -> customFieldBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder lastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withLastModifiedBy( + FunctionIDs and references that last modified the Message.
+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *IDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder createdBy( + FunctionIDs and references that created the Message.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withCreatedBy( + FunctionIDs and references that created the Message.
+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price on which the Custom Type was set.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Custom Fields that were set.
+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder customField( + FunctionCustom Fields that were set.
+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withCustomField( + FunctionCustom Fields that were set.
+ * @param customField value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder customField( + final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + return this; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price on which the Custom Type was set.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Custom Fields that were set.
+ * @return customField + */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Generated after a successful Set Price Custom Type update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessageImpl implements ProductPriceCustomFieldsSetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + private String oldTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsSetMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, + @JsonProperty("customField") final com.commercetools.api.models.type.CustomFields customField, + @JsonProperty("oldTypeId") final String oldTypeId) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.customField = customField; + this.oldTypeId = oldTypeId; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsSetMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
IDs and references that last modified the Message.
+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *IDs and references that created the Message.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Price on which the Custom Type was set.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Custom Fields that were set.
+ */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Generated after a successful Set Price Custom Type update action.
+ * + *
+ * ProductPriceCustomFieldsSetMessagePayload productPriceCustomFieldsSetMessagePayload = ProductPriceCustomFieldsSetMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .customField(customFieldBuilder -> customFieldBuilder)
+ * .build()
+ *
+ * Unique identifier of the Price on which the Custom Type was set.
+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *Custom Fields that were set.
+ * @return customField + */ + @NotNull + @Valid + @JsonProperty("customField") + public CustomFields getCustomField(); + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Unique identifier of the Price on which the Custom Type was set.
+ * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *Custom Fields that were set.
+ * @param customField value to be set + */ + + public void setCustomField(final CustomFields customField); + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
+ * ProductPriceCustomFieldsSetMessagePayload productPriceCustomFieldsSetMessagePayload = ProductPriceCustomFieldsSetMessagePayload.builder()
+ * .priceId("{priceId}")
+ * .variantId(0.3)
+ * .staged(true)
+ * .customField(customFieldBuilder -> customFieldBuilder)
+ * .build()
+ *
+ * Unique identifier of the Price on which the Custom Type was set.
+ * @param priceId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *Custom Fields that were set.
+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder customField( + FunctionCustom Fields that were set.
+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder withCustomField( + FunctionCustom Fields that were set.
+ * @param customField value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder customField( + final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + return this; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Unique identifier of the Price on which the Custom Type was set.
+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Custom Fields that were set.
+ * @return customField + */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.
Generated after a successful Set Price Custom Type update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessagePayloadImpl + implements ProductPriceCustomFieldsSetMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + private String oldTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsSetMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("customField") final com.commercetools.api.models.type.CustomFields customField, + @JsonProperty("oldTypeId") final String oldTypeId) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.customField = customField; + this.oldTypeId = oldTypeId; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsSetMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *Unique identifier of the Price on which the Custom Type was set.
+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *Unique identifier of the ProductVariant to which the Price belongs.
+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *Whether the update was only applied to the staged Product Projection.
+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *Custom Fields that were set.
+ */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *id
of the previous Custom Type. Absent if there was no previous Custom Type present.