Skip to content

Commit a4037b6

Browse files
committed
build(codegen): updating SDK
1 parent dbe63c1 commit a4037b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1671
-108
lines changed

changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
<summary>Changed Type(s)</summary>
180180

181181
- :warning: changed type `Address` from type `object` to `BaseAddress`
182+
- :warning: changed type `GeoLocation` from type `object` to `GeoJson`
182183
</details>
183184

184185

@@ -305,6 +306,8 @@
305306
- changed property `isOnStock` of type `ProductVariantChannelAvailability` to be optional
306307
- changed property `restockableInDays` of type `ProductVariantChannelAvailability` to be optional
307308
- changed property `availableQuantity` of type `ProductVariantChannelAvailability` to be optional
309+
- changed property `id` of type `ResourceIdentifier` to be optional
310+
- changed property `key` of type `ResourceIdentifier` to be optional
308311
- changed property `returnTrackingId` of type `ReturnInfo` to be optional
309312
- changed property `returnDate` of type `ReturnInfo` to be optional
310313
- changed property `comment` of type `ReturnItem` to be optional

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddProductChangeBuilder.java

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ public AddProductChangeBuilder nextValue(
6666

6767
/**
6868
* <p>The <a href="https://docs.commercetools.com/apis/ctp:api:type:ProductVariant" rel="nofollow">Product Variants</a> included in the <a href="https://docs.commercetools.com/apis/ctp:api:type:ProductSelection" rel="nofollow">Product Selection</a>.</p>
69-
* @param variantSelection value to be set
69+
* @param builder function to build the variantSelection value
7070
* @return Builder
7171
*/
7272

7373
public AddProductChangeBuilder variantSelection(
74-
final com.commercetools.history.models.common.ProductVariantSelection variantSelection) {
75-
this.variantSelection = variantSelection;
74+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelectionBuilder> builder) {
75+
this.variantSelection = builder
76+
.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
77+
.build();
7678
return this;
7779
}
7880

@@ -82,11 +84,22 @@ public AddProductChangeBuilder variantSelection(
8284
* @return Builder
8385
*/
8486

85-
public AddProductChangeBuilder variantSelection(
86-
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, Builder<? extends com.commercetools.history.models.common.ProductVariantSelection>> builder) {
87+
public AddProductChangeBuilder withVariantSelection(
88+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelection> builder) {
8789
this.variantSelection = builder
88-
.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
89-
.build();
90+
.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of());
91+
return this;
92+
}
93+
94+
/**
95+
* <p>The <a href="https://docs.commercetools.com/apis/ctp:api:type:ProductVariant" rel="nofollow">Product Variants</a> included in the <a href="https://docs.commercetools.com/apis/ctp:api:type:ProductSelection" rel="nofollow">Product Selection</a>.</p>
96+
* @param variantSelection value to be set
97+
* @return Builder
98+
*/
99+
100+
public AddProductChangeBuilder variantSelection(
101+
final com.commercetools.history.models.common.ProductVariantSelection variantSelection) {
102+
this.variantSelection = variantSelection;
90103
return this;
91104
}
92105

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantSelectionChangeBuilder.java

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ public SetVariantSelectionChangeBuilder change(final String change) {
4646

4747
/**
4848
* <p>Value before the change.</p>
49-
* @param previousValue value to be set
49+
* @param builder function to build the previousValue value
5050
* @return Builder
5151
*/
5252

5353
public SetVariantSelectionChangeBuilder previousValue(
54-
final com.commercetools.history.models.common.ProductVariantSelection previousValue) {
55-
this.previousValue = previousValue;
54+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelectionBuilder> builder) {
55+
this.previousValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
56+
.build();
5657
return this;
5758
}
5859

@@ -62,22 +63,34 @@ public SetVariantSelectionChangeBuilder previousValue(
6263
* @return Builder
6364
*/
6465

66+
public SetVariantSelectionChangeBuilder withPreviousValue(
67+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelection> builder) {
68+
this.previousValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of());
69+
return this;
70+
}
71+
72+
/**
73+
* <p>Value before the change.</p>
74+
* @param previousValue value to be set
75+
* @return Builder
76+
*/
77+
6578
public SetVariantSelectionChangeBuilder previousValue(
66-
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, Builder<? extends com.commercetools.history.models.common.ProductVariantSelection>> builder) {
67-
this.previousValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
68-
.build();
79+
final com.commercetools.history.models.common.ProductVariantSelection previousValue) {
80+
this.previousValue = previousValue;
6981
return this;
7082
}
7183

7284
/**
7385
* <p>Value after the change.</p>
74-
* @param nextValue value to be set
86+
* @param builder function to build the nextValue value
7587
* @return Builder
7688
*/
7789

7890
public SetVariantSelectionChangeBuilder nextValue(
79-
final com.commercetools.history.models.common.ProductVariantSelection nextValue) {
80-
this.nextValue = nextValue;
91+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelectionBuilder> builder) {
92+
this.nextValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
93+
.build();
8194
return this;
8295
}
8396

@@ -87,10 +100,21 @@ public SetVariantSelectionChangeBuilder nextValue(
87100
* @return Builder
88101
*/
89102

103+
public SetVariantSelectionChangeBuilder withNextValue(
104+
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, com.commercetools.history.models.common.ProductVariantSelection> builder) {
105+
this.nextValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of());
106+
return this;
107+
}
108+
109+
/**
110+
* <p>Value after the change.</p>
111+
* @param nextValue value to be set
112+
* @return Builder
113+
*/
114+
90115
public SetVariantSelectionChangeBuilder nextValue(
91-
Function<com.commercetools.history.models.common.ProductVariantSelectionBuilder, Builder<? extends com.commercetools.history.models.common.ProductVariantSelection>> builder) {
92-
this.nextValue = builder.apply(com.commercetools.history.models.common.ProductVariantSelectionBuilder.of())
93-
.build();
116+
final com.commercetools.history.models.common.ProductVariantSelection nextValue) {
117+
this.nextValue = nextValue;
94118
return this;
95119
}
96120

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTarget.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
* <div class=code-example>
2323
* <pre><code class='java'>
2424
* CartDiscountTarget cartDiscountTarget = CartDiscountTarget.builder()
25+
* .type("{type}")
2526
* .build()
2627
* </code></pre>
2728
* </div>
2829
*/
2930
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
31+
@JsonDeserialize(as = CartDiscountTargetImpl.class)
3032
public interface CartDiscountTarget {
3133

3234
/**
@@ -37,6 +39,32 @@ public interface CartDiscountTarget {
3739
@JsonProperty("type")
3840
public String getType();
3941

42+
/**
43+
* set type
44+
* @param type value to be set
45+
*/
46+
47+
public void setType(final String type);
48+
49+
/**
50+
* factory method
51+
* @return instance of CartDiscountTarget
52+
*/
53+
public static CartDiscountTarget of() {
54+
return new CartDiscountTargetImpl();
55+
}
56+
57+
/**
58+
* factory method to create a shallow copy CartDiscountTarget
59+
* @param template instance to be copied
60+
* @return copy instance
61+
*/
62+
public static CartDiscountTarget of(final CartDiscountTarget template) {
63+
CartDiscountTargetImpl instance = new CartDiscountTargetImpl();
64+
instance.setType(template.getType());
65+
return instance;
66+
}
67+
4068
public CartDiscountTarget copyDeep();
4169

4270
/**
@@ -50,9 +78,27 @@ public static CartDiscountTarget deepCopy(@Nullable final CartDiscountTarget tem
5078
return null;
5179
}
5280
CartDiscountTargetImpl instance = new CartDiscountTargetImpl();
81+
instance.setType(template.getType());
5382
return instance;
5483
}
5584

85+
/**
86+
* builder factory method for CartDiscountTarget
87+
* @return builder
88+
*/
89+
public static CartDiscountTargetBuilder builder() {
90+
return CartDiscountTargetBuilder.of();
91+
}
92+
93+
/**
94+
* create builder for CartDiscountTarget instance
95+
* @param template instance with prefilled values for the builder
96+
* @return builder
97+
*/
98+
public static CartDiscountTargetBuilder builder(final CartDiscountTarget template) {
99+
return CartDiscountTargetBuilder.of(template);
100+
}
101+
56102
/**
57103
* accessor map function
58104
* @param <T> mapped type

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetBuilder.java

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,62 @@
33

44
import java.util.*;
55

6+
import io.vrap.rmf.base.client.Builder;
67
import io.vrap.rmf.base.client.utils.Generated;
78

89
/**
910
* CartDiscountTargetBuilder
11+
* <hr>
12+
* Example to create an instance using the builder pattern
13+
* <div class=code-example>
14+
* <pre><code class='java'>
15+
* CartDiscountTarget cartDiscountTarget = CartDiscountTarget.builder()
16+
* .type("{type}")
17+
* .build()
18+
* </code></pre>
19+
* </div>
1020
*/
1121
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
12-
public class CartDiscountTargetBuilder {
22+
public class CartDiscountTargetBuilder implements Builder<CartDiscountTarget> {
23+
24+
private String type;
25+
26+
/**
27+
* set the value to the type
28+
* @param type value to be set
29+
* @return Builder
30+
*/
31+
32+
public CartDiscountTargetBuilder type(final String type) {
33+
this.type = type;
34+
return this;
35+
}
36+
37+
/**
38+
* value of type}
39+
* @return type
40+
*/
41+
42+
public String getType() {
43+
return this.type;
44+
}
45+
46+
/**
47+
* builds CartDiscountTarget with checking for non-null required values
48+
* @return CartDiscountTarget
49+
*/
50+
public CartDiscountTarget build() {
51+
Objects.requireNonNull(type, CartDiscountTarget.class + ": type is missing");
52+
return new CartDiscountTargetImpl(type);
53+
}
54+
55+
/**
56+
* builds CartDiscountTarget without checking for non-null required values
57+
* @return CartDiscountTarget
58+
*/
59+
public CartDiscountTarget buildUnchecked() {
60+
return new CartDiscountTargetImpl(type);
61+
}
1362

1463
/**
1564
* factory method for an instance of CartDiscountTargetBuilder
@@ -19,4 +68,15 @@ public static CartDiscountTargetBuilder of() {
1968
return new CartDiscountTargetBuilder();
2069
}
2170

71+
/**
72+
* create builder for CartDiscountTarget instance
73+
* @param template instance with prefilled values for the builder
74+
* @return builder
75+
*/
76+
public static CartDiscountTargetBuilder of(final CartDiscountTarget template) {
77+
CartDiscountTargetBuilder builder = new CartDiscountTargetBuilder();
78+
builder.type = template.getType();
79+
return builder;
80+
}
81+
2282
}

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public String getType() {
4646
return this.type;
4747
}
4848

49+
public void setType(final String type) {
50+
this.type = type;
51+
}
52+
4953
@Override
5054
public boolean equals(Object o) {
5155
if (this == o)

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValue.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
* <div class=code-example>
2323
* <pre><code class='java'>
2424
* CartDiscountValue cartDiscountValue = CartDiscountValue.builder()
25+
* .type("{type}")
2526
* .build()
2627
* </code></pre>
2728
* </div>
2829
*/
2930
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
31+
@JsonDeserialize(as = CartDiscountValueImpl.class)
3032
public interface CartDiscountValue {
3133

3234
/**
@@ -37,6 +39,32 @@ public interface CartDiscountValue {
3739
@JsonProperty("type")
3840
public String getType();
3941

42+
/**
43+
* set type
44+
* @param type value to be set
45+
*/
46+
47+
public void setType(final String type);
48+
49+
/**
50+
* factory method
51+
* @return instance of CartDiscountValue
52+
*/
53+
public static CartDiscountValue of() {
54+
return new CartDiscountValueImpl();
55+
}
56+
57+
/**
58+
* factory method to create a shallow copy CartDiscountValue
59+
* @param template instance to be copied
60+
* @return copy instance
61+
*/
62+
public static CartDiscountValue of(final CartDiscountValue template) {
63+
CartDiscountValueImpl instance = new CartDiscountValueImpl();
64+
instance.setType(template.getType());
65+
return instance;
66+
}
67+
4068
public CartDiscountValue copyDeep();
4169

4270
/**
@@ -50,9 +78,27 @@ public static CartDiscountValue deepCopy(@Nullable final CartDiscountValue templ
5078
return null;
5179
}
5280
CartDiscountValueImpl instance = new CartDiscountValueImpl();
81+
instance.setType(template.getType());
5382
return instance;
5483
}
5584

85+
/**
86+
* builder factory method for CartDiscountValue
87+
* @return builder
88+
*/
89+
public static CartDiscountValueBuilder builder() {
90+
return CartDiscountValueBuilder.of();
91+
}
92+
93+
/**
94+
* create builder for CartDiscountValue instance
95+
* @param template instance with prefilled values for the builder
96+
* @return builder
97+
*/
98+
public static CartDiscountValueBuilder builder(final CartDiscountValue template) {
99+
return CartDiscountValueBuilder.of(template);
100+
}
101+
56102
/**
57103
* accessor map function
58104
* @param <T> mapped type

0 commit comments

Comments
 (0)