Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated SDKs #730

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
<details>
<summary>Added Property(s)</summary>

- added property `staged` to type `ProductVariantDeletedMessage`
- added property `staged` to type `ProductVariantDeletedMessagePayload`
- added property `warnings` to type `ProductTailoring`
- added property `warnings` to type `Product`
</details>


<details>
<summary>Added Type(s)</summary>

- added type `ImageProcessingOngoingWarning`
- added type `WarningObject`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductTailoringImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductTailoringImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductTailoringImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductTailoringImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. The image is uploaded to the Master Variant if <code>variant</code> or <code>sku</code> are not included. Produces the ProductImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG, or a GIF image file to a ProductVariant. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Upload a JPEG, PNG and GIF file to a ProductVariant. The maximum file size of the image is 10MB. <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. The image is uploaded to the Master Variant if <code>variant</code> or <code>sku</code> are not included. Produces the ProductImageAdded Message when the <code>Small</code> version of the image has been uploaded to the CDN.</p>
* <p>Uploads a JPEG, PNG, or a GIF image file to a ProductVariant. The maximum file size of the image is <strong>10MB</strong>. Either <code>variant</code> or <code>sku</code> is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.</p>
* <p>The response status code depends on the size of the original image. If the image is small, the API responds with <code>200 OK</code>, and if the image is larger, it responds with <code>202 Accepted</code>. The Product returned with a <code>202 Accepted</code> status code contains a <code>warnings</code> field with an ImageProcessingOngoing Warning.</p>
* <p>Produces the ProductImageAdded Message.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.time.ZonedDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

import javax.annotation.Nullable;

Expand All @@ -15,6 +16,7 @@
import com.commercetools.api.models.review.ReviewRatingStatistics;
import com.commercetools.api.models.state.StateReference;
import com.commercetools.api.models.tax_category.TaxCategoryReference;
import com.commercetools.api.models.warning.WarningObject;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

Expand Down Expand Up @@ -154,6 +156,14 @@ public interface Product extends BaseResource, ProductMixin, com.commercetools.a
@JsonProperty("priceMode")
public ProductPriceModeEnum getPriceMode();

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @return warnings
*/
@Valid
@JsonProperty("warnings")
public List<WarningObject> getWarnings();

/**
* <p>Unique identifier of the Product.</p>
* @param id value to be set
Expand Down Expand Up @@ -246,6 +256,21 @@ public interface Product extends BaseResource, ProductMixin, com.commercetools.a

public void setPriceMode(final ProductPriceModeEnum priceMode);

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param warnings values to be set
*/

@JsonIgnore
public void setWarnings(final WarningObject... warnings);

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param warnings values to be set
*/

public void setWarnings(final List<WarningObject> warnings);

/**
* factory method
* @return instance of Product
Expand Down Expand Up @@ -274,6 +299,7 @@ public static Product of(final Product template) {
instance.setState(template.getState());
instance.setReviewRatingStatistics(template.getReviewRatingStatistics());
instance.setPriceMode(template.getPriceMode());
instance.setWarnings(template.getWarnings());
return instance;
}

Expand Down Expand Up @@ -306,6 +332,11 @@ public static Product deepCopy(@Nullable final Product template) {
instance.setReviewRatingStatistics(
com.commercetools.api.models.review.ReviewRatingStatistics.deepCopy(template.getReviewRatingStatistics()));
instance.setPriceMode(template.getPriceMode());
instance.setWarnings(Optional.ofNullable(template.getWarnings())
.map(t -> t.stream()
.map(com.commercetools.api.models.warning.WarningObject::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
return instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public class ProductBuilder implements Builder<Product> {
@Nullable
private com.commercetools.api.models.product.ProductPriceModeEnum priceMode;

@Nullable
private java.util.List<com.commercetools.api.models.warning.WarningObject> warnings;

/**
* <p>Unique identifier of the Product.</p>
* @param id value to be set
Expand Down Expand Up @@ -384,6 +387,71 @@ public ProductBuilder priceMode(
return this;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param warnings value to be set
* @return Builder
*/

public ProductBuilder warnings(@Nullable final com.commercetools.api.models.warning.WarningObject... warnings) {
this.warnings = new ArrayList<>(Arrays.asList(warnings));
return this;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param warnings value to be set
* @return Builder
*/

public ProductBuilder warnings(
@Nullable final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
this.warnings = warnings;
return this;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param warnings value to be set
* @return Builder
*/

public ProductBuilder plusWarnings(@Nullable final com.commercetools.api.models.warning.WarningObject... warnings) {
if (this.warnings == null) {
this.warnings = new ArrayList<>();
}
this.warnings.addAll(Arrays.asList(warnings));
return this;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param builder function to build the warnings value
* @return Builder
*/

public ProductBuilder plusWarnings(
Function<com.commercetools.api.models.warning.WarningObjectBuilder, Builder<? extends com.commercetools.api.models.warning.WarningObject>> builder) {
if (this.warnings == null) {
this.warnings = new ArrayList<>();
}
this.warnings.add(builder.apply(com.commercetools.api.models.warning.WarningObjectBuilder.of()).build());
return this;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @param builder function to build the warnings value
* @return Builder
*/

public ProductBuilder withWarnings(
Function<com.commercetools.api.models.warning.WarningObjectBuilder, Builder<? extends com.commercetools.api.models.warning.WarningObject>> builder) {
this.warnings = new ArrayList<>();
this.warnings.add(builder.apply(com.commercetools.api.models.warning.WarningObjectBuilder.of()).build());
return this;
}

/**
* <p>Unique identifier of the Product.</p>
* @return id
Expand Down Expand Up @@ -509,6 +577,16 @@ public com.commercetools.api.models.product.ProductPriceModeEnum getPriceMode()
return this.priceMode;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
* @return warnings
*/

@Nullable
public java.util.List<com.commercetools.api.models.warning.WarningObject> getWarnings() {
return this.warnings;
}

/**
* builds Product with checking for non-null required values
* @return Product
Expand All @@ -521,7 +599,7 @@ public Product build() {
Objects.requireNonNull(productType, Product.class + ": productType is missing");
Objects.requireNonNull(masterData, Product.class + ": masterData is missing");
return new ProductImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, productType,
masterData, taxCategory, state, reviewRatingStatistics, priceMode);
masterData, taxCategory, state, reviewRatingStatistics, priceMode, warnings);
}

/**
Expand All @@ -530,7 +608,7 @@ public Product build() {
*/
public Product buildUnchecked() {
return new ProductImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, productType,
masterData, taxCategory, state, reviewRatingStatistics, priceMode);
masterData, taxCategory, state, reviewRatingStatistics, priceMode, warnings);
}

/**
Expand Down Expand Up @@ -561,6 +639,7 @@ public static ProductBuilder of(final Product template) {
builder.state = template.getState();
builder.reviewRatingStatistics = template.getReviewRatingStatistics();
builder.priceMode = template.getPriceMode();
builder.warnings = template.getWarnings();
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public class ProductImpl implements Product, ModelBase {

private com.commercetools.api.models.product.ProductPriceModeEnum priceMode;

private java.util.List<com.commercetools.api.models.warning.WarningObject> warnings;

/**
* create instance with all properties
*/
Expand All @@ -63,7 +65,8 @@ public class ProductImpl implements Product, ModelBase {
@JsonProperty("taxCategory") final com.commercetools.api.models.tax_category.TaxCategoryReference taxCategory,
@JsonProperty("state") final com.commercetools.api.models.state.StateReference state,
@JsonProperty("reviewRatingStatistics") final com.commercetools.api.models.review.ReviewRatingStatistics reviewRatingStatistics,
@JsonProperty("priceMode") final com.commercetools.api.models.product.ProductPriceModeEnum priceMode) {
@JsonProperty("priceMode") final com.commercetools.api.models.product.ProductPriceModeEnum priceMode,
@JsonProperty("warnings") final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
this.id = id;
this.version = version;
this.createdAt = createdAt;
Expand All @@ -77,6 +80,7 @@ public class ProductImpl implements Product, ModelBase {
this.state = state;
this.reviewRatingStatistics = reviewRatingStatistics;
this.priceMode = priceMode;
this.warnings = warnings;
}

/**
Expand Down Expand Up @@ -190,6 +194,14 @@ public com.commercetools.api.models.product.ProductPriceModeEnum getPriceMode()
return this.priceMode;
}

/**
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
*/

public java.util.List<com.commercetools.api.models.warning.WarningObject> getWarnings() {
return this.warnings;
}

public void setId(final String id) {
this.id = id;
}
Expand Down Expand Up @@ -243,6 +255,14 @@ public void setPriceMode(final com.commercetools.api.models.product.ProductPrice
this.priceMode = priceMode;
}

public void setWarnings(final com.commercetools.api.models.warning.WarningObject... warnings) {
this.warnings = new ArrayList<>(Arrays.asList(warnings));
}

public void setWarnings(final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
this.warnings = warnings;
}

@Override
public boolean equals(Object o) {
if (this == o)
Expand All @@ -266,6 +286,7 @@ public boolean equals(Object o) {
.append(state, that.state)
.append(reviewRatingStatistics, that.reviewRatingStatistics)
.append(priceMode, that.priceMode)
.append(warnings, that.warnings)
.append(id, that.id)
.append(version, that.version)
.append(createdAt, that.createdAt)
Expand All @@ -279,6 +300,7 @@ public boolean equals(Object o) {
.append(state, that.state)
.append(reviewRatingStatistics, that.reviewRatingStatistics)
.append(priceMode, that.priceMode)
.append(warnings, that.warnings)
.isEquals();
}

Expand All @@ -297,6 +319,7 @@ public int hashCode() {
.append(state)
.append(reviewRatingStatistics)
.append(priceMode)
.append(warnings)
.toHashCode();
}

Expand All @@ -315,6 +338,7 @@ public String toString() {
.append("state", state)
.append("reviewRatingStatistics", reviewRatingStatistics)
.append("priceMode", priceMode)
.append("warnings", warnings)
.build();
}

Expand Down
Loading
Loading