Skip to content

Commit c8a00d5

Browse files
committed
build(codegen): updating SDK
1 parent cbbde56 commit c8a00d5

30 files changed

+1002
-24
lines changed

changes.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
<details>
44
<summary>Added Property(s)</summary>
55

6-
- added property `staged` to type `ProductVariantDeletedMessage`
7-
- added property `staged` to type `ProductVariantDeletedMessagePayload`
6+
- added property `warnings` to type `ProductTailoring`
7+
- added property `warnings` to type `Product`
8+
</details>
9+
10+
11+
<details>
12+
<summary>Added Type(s)</summary>
13+
14+
- added type `ImageProcessingOngoingWarning`
15+
- added type `WarningObject`
816
</details>
917

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
import org.apache.commons.lang3.builder.HashCodeBuilder;
2424

2525
/**
26-
* <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>
26+
* <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>
27+
* <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>
28+
* <p>Produces the ProductTailoringImageAdded Message.</p>
2729
*
2830
* <hr>
2931
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import org.apache.commons.lang3.builder.HashCodeBuilder;
2222

2323
/**
24-
* <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>
24+
* <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>
25+
* <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>
26+
* <p>Produces the ProductTailoringImageAdded Message.</p>
2527
*
2628
* <hr>
2729
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
import org.apache.commons.lang3.builder.HashCodeBuilder;
2424

2525
/**
26-
* <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>
26+
* <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>
27+
* <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>
28+
* <p>Produces the ProductTailoringImageAdded Message.</p>
2729
*
2830
* <hr>
2931
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import org.apache.commons.lang3.builder.HashCodeBuilder;
2222

2323
/**
24-
* <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>
24+
* <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>
25+
* <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>
26+
* <p>Produces the ProductTailoringImageAdded Message.</p>
2527
*
2628
* <hr>
2729
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDImagesPost.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
import org.apache.commons.lang3.builder.HashCodeBuilder;
2424

2525
/**
26-
* <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>
26+
* <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>
27+
* <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>
28+
* <p>Produces the ProductImageAdded Message.</p>
2729
*
2830
* <hr>
2931
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDImagesPostString.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import org.apache.commons.lang3.builder.HashCodeBuilder;
2222

2323
/**
24-
* <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>
24+
* <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>
25+
* <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>
26+
* <p>Produces the ProductImageAdded Message.</p>
2527
*
2628
* <hr>
2729
* <div class=code-example>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/Product.java

+31
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.time.ZonedDateTime;
66
import java.util.*;
77
import java.util.function.Function;
8+
import java.util.stream.Collectors;
89

910
import javax.annotation.Nullable;
1011

@@ -15,6 +16,7 @@
1516
import com.commercetools.api.models.review.ReviewRatingStatistics;
1617
import com.commercetools.api.models.state.StateReference;
1718
import com.commercetools.api.models.tax_category.TaxCategoryReference;
19+
import com.commercetools.api.models.warning.WarningObject;
1820
import com.fasterxml.jackson.annotation.*;
1921
import com.fasterxml.jackson.databind.annotation.*;
2022

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

159+
/**
160+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
161+
* @return warnings
162+
*/
163+
@Valid
164+
@JsonProperty("warnings")
165+
public List<WarningObject> getWarnings();
166+
157167
/**
158168
* <p>Unique identifier of the Product.</p>
159169
* @param id value to be set
@@ -246,6 +256,21 @@ public interface Product extends BaseResource, ProductMixin, com.commercetools.a
246256

247257
public void setPriceMode(final ProductPriceModeEnum priceMode);
248258

259+
/**
260+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
261+
* @param warnings values to be set
262+
*/
263+
264+
@JsonIgnore
265+
public void setWarnings(final WarningObject... warnings);
266+
267+
/**
268+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
269+
* @param warnings values to be set
270+
*/
271+
272+
public void setWarnings(final List<WarningObject> warnings);
273+
249274
/**
250275
* factory method
251276
* @return instance of Product
@@ -274,6 +299,7 @@ public static Product of(final Product template) {
274299
instance.setState(template.getState());
275300
instance.setReviewRatingStatistics(template.getReviewRatingStatistics());
276301
instance.setPriceMode(template.getPriceMode());
302+
instance.setWarnings(template.getWarnings());
277303
return instance;
278304
}
279305

@@ -306,6 +332,11 @@ public static Product deepCopy(@Nullable final Product template) {
306332
instance.setReviewRatingStatistics(
307333
com.commercetools.api.models.review.ReviewRatingStatistics.deepCopy(template.getReviewRatingStatistics()));
308334
instance.setPriceMode(template.getPriceMode());
335+
instance.setWarnings(Optional.ofNullable(template.getWarnings())
336+
.map(t -> t.stream()
337+
.map(com.commercetools.api.models.warning.WarningObject::deepCopy)
338+
.collect(Collectors.toList()))
339+
.orElse(null));
309340
return instance;
310341
}
311342

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductBuilder.java

+81-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public class ProductBuilder implements Builder<Product> {
6262
@Nullable
6363
private com.commercetools.api.models.product.ProductPriceModeEnum priceMode;
6464

65+
@Nullable
66+
private java.util.List<com.commercetools.api.models.warning.WarningObject> warnings;
67+
6568
/**
6669
* <p>Unique identifier of the Product.</p>
6770
* @param id value to be set
@@ -384,6 +387,71 @@ public ProductBuilder priceMode(
384387
return this;
385388
}
386389

390+
/**
391+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
392+
* @param warnings value to be set
393+
* @return Builder
394+
*/
395+
396+
public ProductBuilder warnings(@Nullable final com.commercetools.api.models.warning.WarningObject... warnings) {
397+
this.warnings = new ArrayList<>(Arrays.asList(warnings));
398+
return this;
399+
}
400+
401+
/**
402+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
403+
* @param warnings value to be set
404+
* @return Builder
405+
*/
406+
407+
public ProductBuilder warnings(
408+
@Nullable final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
409+
this.warnings = warnings;
410+
return this;
411+
}
412+
413+
/**
414+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
415+
* @param warnings value to be set
416+
* @return Builder
417+
*/
418+
419+
public ProductBuilder plusWarnings(@Nullable final com.commercetools.api.models.warning.WarningObject... warnings) {
420+
if (this.warnings == null) {
421+
this.warnings = new ArrayList<>();
422+
}
423+
this.warnings.addAll(Arrays.asList(warnings));
424+
return this;
425+
}
426+
427+
/**
428+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
429+
* @param builder function to build the warnings value
430+
* @return Builder
431+
*/
432+
433+
public ProductBuilder plusWarnings(
434+
Function<com.commercetools.api.models.warning.WarningObjectBuilder, Builder<? extends com.commercetools.api.models.warning.WarningObject>> builder) {
435+
if (this.warnings == null) {
436+
this.warnings = new ArrayList<>();
437+
}
438+
this.warnings.add(builder.apply(com.commercetools.api.models.warning.WarningObjectBuilder.of()).build());
439+
return this;
440+
}
441+
442+
/**
443+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
444+
* @param builder function to build the warnings value
445+
* @return Builder
446+
*/
447+
448+
public ProductBuilder withWarnings(
449+
Function<com.commercetools.api.models.warning.WarningObjectBuilder, Builder<? extends com.commercetools.api.models.warning.WarningObject>> builder) {
450+
this.warnings = new ArrayList<>();
451+
this.warnings.add(builder.apply(com.commercetools.api.models.warning.WarningObjectBuilder.of()).build());
452+
return this;
453+
}
454+
387455
/**
388456
* <p>Unique identifier of the Product.</p>
389457
* @return id
@@ -509,6 +577,16 @@ public com.commercetools.api.models.product.ProductPriceModeEnum getPriceMode()
509577
return this.priceMode;
510578
}
511579

580+
/**
581+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
582+
* @return warnings
583+
*/
584+
585+
@Nullable
586+
public java.util.List<com.commercetools.api.models.warning.WarningObject> getWarnings() {
587+
return this.warnings;
588+
}
589+
512590
/**
513591
* builds Product with checking for non-null required values
514592
* @return Product
@@ -521,7 +599,7 @@ public Product build() {
521599
Objects.requireNonNull(productType, Product.class + ": productType is missing");
522600
Objects.requireNonNull(masterData, Product.class + ": masterData is missing");
523601
return new ProductImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, productType,
524-
masterData, taxCategory, state, reviewRatingStatistics, priceMode);
602+
masterData, taxCategory, state, reviewRatingStatistics, priceMode, warnings);
525603
}
526604

527605
/**
@@ -530,7 +608,7 @@ public Product build() {
530608
*/
531609
public Product buildUnchecked() {
532610
return new ProductImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, productType,
533-
masterData, taxCategory, state, reviewRatingStatistics, priceMode);
611+
masterData, taxCategory, state, reviewRatingStatistics, priceMode, warnings);
534612
}
535613

536614
/**
@@ -561,6 +639,7 @@ public static ProductBuilder of(final Product template) {
561639
builder.state = template.getState();
562640
builder.reviewRatingStatistics = template.getReviewRatingStatistics();
563641
builder.priceMode = template.getPriceMode();
642+
builder.warnings = template.getWarnings();
564643
return builder;
565644
}
566645

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductImpl.java

+25-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public class ProductImpl implements Product, ModelBase {
4848

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

51+
private java.util.List<com.commercetools.api.models.warning.WarningObject> warnings;
52+
5153
/**
5254
* create instance with all properties
5355
*/
@@ -63,7 +65,8 @@ public class ProductImpl implements Product, ModelBase {
6365
@JsonProperty("taxCategory") final com.commercetools.api.models.tax_category.TaxCategoryReference taxCategory,
6466
@JsonProperty("state") final com.commercetools.api.models.state.StateReference state,
6567
@JsonProperty("reviewRatingStatistics") final com.commercetools.api.models.review.ReviewRatingStatistics reviewRatingStatistics,
66-
@JsonProperty("priceMode") final com.commercetools.api.models.product.ProductPriceModeEnum priceMode) {
68+
@JsonProperty("priceMode") final com.commercetools.api.models.product.ProductPriceModeEnum priceMode,
69+
@JsonProperty("warnings") final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
6770
this.id = id;
6871
this.version = version;
6972
this.createdAt = createdAt;
@@ -77,6 +80,7 @@ public class ProductImpl implements Product, ModelBase {
7780
this.state = state;
7881
this.reviewRatingStatistics = reviewRatingStatistics;
7982
this.priceMode = priceMode;
83+
this.warnings = warnings;
8084
}
8185

8286
/**
@@ -190,6 +194,14 @@ public com.commercetools.api.models.product.ProductPriceModeEnum getPriceMode()
190194
return this.priceMode;
191195
}
192196

197+
/**
198+
* <p>Warnings about processing of a request. Appears in response to requests with response status code <code>202 Accepted</code>.</p>
199+
*/
200+
201+
public java.util.List<com.commercetools.api.models.warning.WarningObject> getWarnings() {
202+
return this.warnings;
203+
}
204+
193205
public void setId(final String id) {
194206
this.id = id;
195207
}
@@ -243,6 +255,14 @@ public void setPriceMode(final com.commercetools.api.models.product.ProductPrice
243255
this.priceMode = priceMode;
244256
}
245257

258+
public void setWarnings(final com.commercetools.api.models.warning.WarningObject... warnings) {
259+
this.warnings = new ArrayList<>(Arrays.asList(warnings));
260+
}
261+
262+
public void setWarnings(final java.util.List<com.commercetools.api.models.warning.WarningObject> warnings) {
263+
this.warnings = warnings;
264+
}
265+
246266
@Override
247267
public boolean equals(Object o) {
248268
if (this == o)
@@ -266,6 +286,7 @@ public boolean equals(Object o) {
266286
.append(state, that.state)
267287
.append(reviewRatingStatistics, that.reviewRatingStatistics)
268288
.append(priceMode, that.priceMode)
289+
.append(warnings, that.warnings)
269290
.append(id, that.id)
270291
.append(version, that.version)
271292
.append(createdAt, that.createdAt)
@@ -279,6 +300,7 @@ public boolean equals(Object o) {
279300
.append(state, that.state)
280301
.append(reviewRatingStatistics, that.reviewRatingStatistics)
281302
.append(priceMode, that.priceMode)
303+
.append(warnings, that.warnings)
282304
.isEquals();
283305
}
284306

@@ -297,6 +319,7 @@ public int hashCode() {
297319
.append(state)
298320
.append(reviewRatingStatistics)
299321
.append(priceMode)
322+
.append(warnings)
300323
.toHashCode();
301324
}
302325

@@ -315,6 +338,7 @@ public String toString() {
315338
.append("state", state)
316339
.append("reviewRatingStatistics", reviewRatingStatistics)
317340
.append("priceMode", priceMode)
341+
.append("warnings", warnings)
318342
.build();
319343
}
320344

0 commit comments

Comments
 (0)