Skip to content

Commit ba06a6c

Browse files
committed
build(codegen): updating SDK
1 parent 66d19f5 commit ba06a6c

File tree

12 files changed

+171
-44
lines changed

12 files changed

+171
-44
lines changed

changes.md

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,9 @@
11
**Api changes**
22

3-
<details>
4-
<summary>Removed Method(s)</summary>
5-
6-
- :warning: removed method `apiRoot.withProjectKey().me().businessUnits().withId().delete()`
7-
- :warning: removed method `apiRoot.withProjectKey().me().businessUnits().withKey().delete()`
8-
</details>
9-
10-
113
<details>
124
<summary>Added Property(s)</summary>
135

14-
- added property `applicationMode` to type `CartDiscountValueAbsolute`
15-
- added property `applicationMode` to type `CartDiscountValueAbsoluteDraft`
16-
</details>
17-
18-
19-
<details>
20-
<summary>Added Type(s)</summary>
21-
22-
- added type `DiscountApplicationMode`
23-
- added type `DeliveryCustomFieldAddedMessage`
24-
- added type `DeliveryCustomFieldChangedMessage`
25-
- added type `DeliveryCustomFieldRemovedMessage`
26-
- added type `DeliveryCustomTypeRemovedMessage`
27-
- added type `DeliveryCustomTypeSetMessage`
28-
- added type `DeliveryCustomFieldAddedMessagePayload`
29-
- added type `DeliveryCustomFieldChangedMessagePayload`
30-
- added type `DeliveryCustomFieldRemovedMessagePayload`
31-
- added type `DeliveryCustomTypeRemovedMessagePayload`
32-
- added type `DeliveryCustomTypeSetMessagePayload`
33-
</details>
34-
35-
**Import changes**
36-
37-
<details>
38-
<summary>Added Type(s)</summary>
39-
40-
- added type `ReferencedResourceNotFound`
6+
- added property `staged` to type `ProductVariantDeletedMessage`
7+
- added property `staged` to type `ProductVariantDeletedMessagePayload`
418
</details>
429

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantDeletedMessage.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* .resource(resourceBuilder -> resourceBuilder)
3333
* .resourceVersion(0.3)
3434
* .plusRemovedImageUrls(removedImageUrlsBuilder -> removedImageUrlsBuilder)
35+
* .staged(true)
3536
* .build()
3637
* </code></pre>
3738
* </div>
@@ -61,6 +62,14 @@ public interface ProductVariantDeletedMessage extends Message {
6162
@JsonProperty("removedImageUrls")
6263
public List<String> getRemovedImageUrls();
6364

65+
/**
66+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
67+
* @return staged
68+
*/
69+
@NotNull
70+
@JsonProperty("staged")
71+
public Boolean getStaged();
72+
6473
/**
6574
* <p>Unique identifier of the Product Variant that was added.</p>
6675
* @param variant value to be set
@@ -83,6 +92,13 @@ public interface ProductVariantDeletedMessage extends Message {
8392

8493
public void setRemovedImageUrls(final List<String> removedImageUrls);
8594

95+
/**
96+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
97+
* @param staged value to be set
98+
*/
99+
100+
public void setStaged(final Boolean staged);
101+
86102
/**
87103
* factory method
88104
* @return instance of ProductVariantDeletedMessage
@@ -110,6 +126,7 @@ public static ProductVariantDeletedMessage of(final ProductVariantDeletedMessage
110126
instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers());
111127
instance.setVariant(template.getVariant());
112128
instance.setRemovedImageUrls(template.getRemovedImageUrls());
129+
instance.setStaged(template.getStaged());
113130
return instance;
114131
}
115132

@@ -139,6 +156,7 @@ public static ProductVariantDeletedMessage deepCopy(@Nullable final ProductVaria
139156
instance.setVariant(com.commercetools.api.models.product.ProductVariant.deepCopy(template.getVariant()));
140157
instance.setRemovedImageUrls(
141158
Optional.ofNullable(template.getRemovedImageUrls()).map(ArrayList::new).orElse(null));
159+
instance.setStaged(template.getStaged());
142160
return instance;
143161
}
144162

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantDeletedMessageBuilder.java

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* .resource(resourceBuilder -> resourceBuilder)
2525
* .resourceVersion(0.3)
2626
* .plusRemovedImageUrls(removedImageUrlsBuilder -> removedImageUrlsBuilder)
27+
* .staged(true)
2728
* .build()
2829
* </code></pre>
2930
* </div>
@@ -59,6 +60,8 @@ public class ProductVariantDeletedMessageBuilder implements Builder<ProductVaria
5960

6061
private java.util.List<String> removedImageUrls;
6162

63+
private Boolean staged;
64+
6265
/**
6366
* <p>Unique identifier of the Message. Can be used to track which Messages have been processed.</p>
6467
* @param id value to be set
@@ -331,6 +334,17 @@ public ProductVariantDeletedMessageBuilder plusRemovedImageUrls(final String...
331334
return this;
332335
}
333336

337+
/**
338+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
339+
* @param staged value to be set
340+
* @return Builder
341+
*/
342+
343+
public ProductVariantDeletedMessageBuilder staged(final Boolean staged) {
344+
this.staged = staged;
345+
return this;
346+
}
347+
334348
/**
335349
* <p>Unique identifier of the Message. Can be used to track which Messages have been processed.</p>
336350
* @return id
@@ -443,6 +457,15 @@ public java.util.List<String> getRemovedImageUrls() {
443457
return this.removedImageUrls;
444458
}
445459

460+
/**
461+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
462+
* @return staged
463+
*/
464+
465+
public Boolean getStaged() {
466+
return this.staged;
467+
}
468+
446469
/**
447470
* builds ProductVariantDeletedMessage with checking for non-null required values
448471
* @return ProductVariantDeletedMessage
@@ -456,8 +479,10 @@ public ProductVariantDeletedMessage build() {
456479
Objects.requireNonNull(resource, ProductVariantDeletedMessage.class + ": resource is missing");
457480
Objects.requireNonNull(resourceVersion, ProductVariantDeletedMessage.class + ": resourceVersion is missing");
458481
Objects.requireNonNull(removedImageUrls, ProductVariantDeletedMessage.class + ": removedImageUrls is missing");
482+
Objects.requireNonNull(staged, ProductVariantDeletedMessage.class + ": staged is missing");
459483
return new ProductVariantDeletedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy,
460-
sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, variant, removedImageUrls);
484+
sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, variant, removedImageUrls,
485+
staged);
461486
}
462487

463488
/**
@@ -466,7 +491,8 @@ public ProductVariantDeletedMessage build() {
466491
*/
467492
public ProductVariantDeletedMessage buildUnchecked() {
468493
return new ProductVariantDeletedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy,
469-
sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, variant, removedImageUrls);
494+
sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, variant, removedImageUrls,
495+
staged);
470496
}
471497

472498
/**
@@ -496,6 +522,7 @@ public static ProductVariantDeletedMessageBuilder of(final ProductVariantDeleted
496522
builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers();
497523
builder.variant = template.getVariant();
498524
builder.removedImageUrls = template.getRemovedImageUrls();
525+
builder.staged = template.getStaged();
499526
return builder;
500527
}
501528

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantDeletedMessageImpl.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public class ProductVariantDeletedMessageImpl implements ProductVariantDeletedMe
4848

4949
private java.util.List<String> removedImageUrls;
5050

51+
private Boolean staged;
52+
5153
/**
5254
* create instance with all properties
5355
*/
@@ -62,7 +64,8 @@ public class ProductVariantDeletedMessageImpl implements ProductVariantDeletedMe
6264
@JsonProperty("resourceVersion") final Long resourceVersion,
6365
@JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers,
6466
@JsonProperty("variant") final com.commercetools.api.models.product.ProductVariant variant,
65-
@JsonProperty("removedImageUrls") final java.util.List<String> removedImageUrls) {
67+
@JsonProperty("removedImageUrls") final java.util.List<String> removedImageUrls,
68+
@JsonProperty("staged") final Boolean staged) {
6669
this.id = id;
6770
this.version = version;
6871
this.createdAt = createdAt;
@@ -75,6 +78,7 @@ public class ProductVariantDeletedMessageImpl implements ProductVariantDeletedMe
7578
this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers;
7679
this.variant = variant;
7780
this.removedImageUrls = removedImageUrls;
81+
this.staged = staged;
7882
this.type = PRODUCT_VARIANT_DELETED;
7983
}
8084

@@ -189,6 +193,14 @@ public java.util.List<String> getRemovedImageUrls() {
189193
return this.removedImageUrls;
190194
}
191195

196+
/**
197+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
198+
*/
199+
200+
public Boolean getStaged() {
201+
return this.staged;
202+
}
203+
192204
public void setId(final String id) {
193205
this.id = id;
194206
}
@@ -242,6 +254,10 @@ public void setRemovedImageUrls(final java.util.List<String> removedImageUrls) {
242254
this.removedImageUrls = removedImageUrls;
243255
}
244256

257+
public void setStaged(final Boolean staged) {
258+
this.staged = staged;
259+
}
260+
245261
@Override
246262
public boolean equals(Object o) {
247263
if (this == o)
@@ -265,6 +281,7 @@ public boolean equals(Object o) {
265281
.append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers)
266282
.append(variant, that.variant)
267283
.append(removedImageUrls, that.removedImageUrls)
284+
.append(staged, that.staged)
268285
.append(id, that.id)
269286
.append(version, that.version)
270287
.append(createdAt, that.createdAt)
@@ -278,6 +295,7 @@ public boolean equals(Object o) {
278295
.append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers)
279296
.append(variant, that.variant)
280297
.append(removedImageUrls, that.removedImageUrls)
298+
.append(staged, that.staged)
281299
.isEquals();
282300
}
283301

@@ -296,6 +314,7 @@ public int hashCode() {
296314
.append(resourceUserProvidedIdentifiers)
297315
.append(variant)
298316
.append(removedImageUrls)
317+
.append(staged)
299318
.toHashCode();
300319
}
301320

@@ -314,6 +333,7 @@ public String toString() {
314333
.append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers)
315334
.append("variant", variant)
316335
.append("removedImageUrls", removedImageUrls)
336+
.append("staged", staged)
317337
.build();
318338
}
319339

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantDeletedMessagePayload.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* <pre><code class='java'>
2626
* ProductVariantDeletedMessagePayload productVariantDeletedMessagePayload = ProductVariantDeletedMessagePayload.builder()
2727
* .plusRemovedImageUrls(removedImageUrlsBuilder -> removedImageUrlsBuilder)
28+
* .staged(true)
2829
* .build()
2930
* </code></pre>
3031
* </div>
@@ -54,6 +55,14 @@ public interface ProductVariantDeletedMessagePayload extends MessagePayload {
5455
@JsonProperty("removedImageUrls")
5556
public List<String> getRemovedImageUrls();
5657

58+
/**
59+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
60+
* @return staged
61+
*/
62+
@NotNull
63+
@JsonProperty("staged")
64+
public Boolean getStaged();
65+
5766
/**
5867
* <p>Unique identifier of the Product Variant that was added.</p>
5968
* @param variant value to be set
@@ -76,6 +85,13 @@ public interface ProductVariantDeletedMessagePayload extends MessagePayload {
7685

7786
public void setRemovedImageUrls(final List<String> removedImageUrls);
7887

88+
/**
89+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
90+
* @param staged value to be set
91+
*/
92+
93+
public void setStaged(final Boolean staged);
94+
7995
/**
8096
* factory method
8197
* @return instance of ProductVariantDeletedMessagePayload
@@ -93,6 +109,7 @@ public static ProductVariantDeletedMessagePayload of(final ProductVariantDeleted
93109
ProductVariantDeletedMessagePayloadImpl instance = new ProductVariantDeletedMessagePayloadImpl();
94110
instance.setVariant(template.getVariant());
95111
instance.setRemovedImageUrls(template.getRemovedImageUrls());
112+
instance.setStaged(template.getStaged());
96113
return instance;
97114
}
98115

@@ -111,6 +128,7 @@ public static ProductVariantDeletedMessagePayload deepCopy(
111128
instance.setVariant(com.commercetools.api.models.product.ProductVariant.deepCopy(template.getVariant()));
112129
instance.setRemovedImageUrls(
113130
Optional.ofNullable(template.getRemovedImageUrls()).map(ArrayList::new).orElse(null));
131+
instance.setStaged(template.getStaged());
114132
return instance;
115133
}
116134

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantDeletedMessagePayloadBuilder.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* <pre><code class='java'>
1818
* ProductVariantDeletedMessagePayload productVariantDeletedMessagePayload = ProductVariantDeletedMessagePayload.builder()
1919
* .plusRemovedImageUrls(removedImageUrlsBuilder -> removedImageUrlsBuilder)
20+
* .staged(true)
2021
* .build()
2122
* </code></pre>
2223
* </div>
@@ -29,6 +30,8 @@ public class ProductVariantDeletedMessagePayloadBuilder implements Builder<Produ
2930

3031
private java.util.List<String> removedImageUrls;
3132

33+
private Boolean staged;
34+
3235
/**
3336
* <p>Unique identifier of the Product Variant that was added.</p>
3437
* @param builder function to build the variant value
@@ -101,6 +104,17 @@ public ProductVariantDeletedMessagePayloadBuilder plusRemovedImageUrls(final Str
101104
return this;
102105
}
103106

107+
/**
108+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
109+
* @param staged value to be set
110+
* @return Builder
111+
*/
112+
113+
public ProductVariantDeletedMessagePayloadBuilder staged(final Boolean staged) {
114+
this.staged = staged;
115+
return this;
116+
}
117+
104118
/**
105119
* <p>Unique identifier of the Product Variant that was added.</p>
106120
* @return variant
@@ -120,22 +134,32 @@ public java.util.List<String> getRemovedImageUrls() {
120134
return this.removedImageUrls;
121135
}
122136

137+
/**
138+
* <p>If <code>true</code>, this message informs that only the staged ProductVariant has been removed by the update action. If <code>false</code>, both the current and staged ProductVariant have been removed.</p>
139+
* @return staged
140+
*/
141+
142+
public Boolean getStaged() {
143+
return this.staged;
144+
}
145+
123146
/**
124147
* builds ProductVariantDeletedMessagePayload with checking for non-null required values
125148
* @return ProductVariantDeletedMessagePayload
126149
*/
127150
public ProductVariantDeletedMessagePayload build() {
128151
Objects.requireNonNull(removedImageUrls,
129152
ProductVariantDeletedMessagePayload.class + ": removedImageUrls is missing");
130-
return new ProductVariantDeletedMessagePayloadImpl(variant, removedImageUrls);
153+
Objects.requireNonNull(staged, ProductVariantDeletedMessagePayload.class + ": staged is missing");
154+
return new ProductVariantDeletedMessagePayloadImpl(variant, removedImageUrls, staged);
131155
}
132156

133157
/**
134158
* builds ProductVariantDeletedMessagePayload without checking for non-null required values
135159
* @return ProductVariantDeletedMessagePayload
136160
*/
137161
public ProductVariantDeletedMessagePayload buildUnchecked() {
138-
return new ProductVariantDeletedMessagePayloadImpl(variant, removedImageUrls);
162+
return new ProductVariantDeletedMessagePayloadImpl(variant, removedImageUrls, staged);
139163
}
140164

141165
/**
@@ -155,6 +179,7 @@ public static ProductVariantDeletedMessagePayloadBuilder of(final ProductVariant
155179
ProductVariantDeletedMessagePayloadBuilder builder = new ProductVariantDeletedMessagePayloadBuilder();
156180
builder.variant = template.getVariant();
157181
builder.removedImageUrls = template.getRemovedImageUrls();
182+
builder.staged = template.getStaged();
158183
return builder;
159184
}
160185

0 commit comments

Comments
 (0)