Skip to content

Commit 826e826

Browse files
committed
build(codegen): updating SDK
1 parent 5ce9e0a commit 826e826

File tree

6 files changed

+84
-77
lines changed

6 files changed

+84
-77
lines changed

changes.md

+8
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,11 @@
3939
- added type `NewMasterVariantAdditionNotAllowedError`
4040
</details>
4141

42+
**History changes**
43+
44+
<details>
45+
<summary>Required Property(s)</summary>
46+
47+
- changed property `id` of type `ModifiedBy` to be optional
48+
</details>
49+

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedBy.java

+17-18
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
* <div class=code-example>
2525
* <pre><code class='java'>
2626
* ModifiedBy modifiedBy = ModifiedBy.builder()
27-
* .id("{id}")
28-
* .type("{type}")
2927
* .isPlatformClient(true)
28+
* .type("{type}")
3029
* .build()
3130
* </code></pre>
3231
* </div>
@@ -35,12 +34,20 @@
3534
@JsonDeserialize(as = ModifiedByImpl.class)
3635
public interface ModifiedBy {
3736

37+
/**
38+
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
39+
* @return isPlatformClient
40+
*/
41+
@NotNull
42+
@JsonProperty("isPlatformClient")
43+
public Boolean getIsPlatformClient();
44+
3845
/**
3946
* <p>ID of the Merchant Center user who made the change.</p>
40-
* <p>Present only if the change was made in the Merchant Center.</p>
47+
* <p>Present only if <code>isPlatformClient</code> is <code>true</code>.</p>
4148
* @return id
4249
*/
43-
@NotNull
50+
4451
@JsonProperty("id")
4552
public String getId();
4653

@@ -93,15 +100,14 @@ public interface ModifiedBy {
93100

94101
/**
95102
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
96-
* @return isPlatformClient
103+
* @param isPlatformClient value to be set
97104
*/
98-
@NotNull
99-
@JsonProperty("isPlatformClient")
100-
public Boolean getIsPlatformClient();
105+
106+
public void setIsPlatformClient(final Boolean isPlatformClient);
101107

102108
/**
103109
* <p>ID of the Merchant Center user who made the change.</p>
104-
* <p>Present only if the change was made in the Merchant Center.</p>
110+
* <p>Present only if <code>isPlatformClient</code> is <code>true</code>.</p>
105111
* @param id value to be set
106112
*/
107113

@@ -149,13 +155,6 @@ public interface ModifiedBy {
149155

150156
public void setAssociate(final Reference associate);
151157

152-
/**
153-
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
154-
* @param isPlatformClient value to be set
155-
*/
156-
157-
public void setIsPlatformClient(final Boolean isPlatformClient);
158-
159158
/**
160159
* factory method
161160
* @return instance of ModifiedBy
@@ -171,13 +170,13 @@ public static ModifiedBy of() {
171170
*/
172171
public static ModifiedBy of(final ModifiedBy template) {
173172
ModifiedByImpl instance = new ModifiedByImpl();
173+
instance.setIsPlatformClient(template.getIsPlatformClient());
174174
instance.setId(template.getId());
175175
instance.setType(template.getType());
176176
instance.setClientId(template.getClientId());
177177
instance.setAnonymousId(template.getAnonymousId());
178178
instance.setCustomer(template.getCustomer());
179179
instance.setAssociate(template.getAssociate());
180-
instance.setIsPlatformClient(template.getIsPlatformClient());
181180
return instance;
182181
}
183182

@@ -192,13 +191,13 @@ public static ModifiedBy deepCopy(@Nullable final ModifiedBy template) {
192191
return null;
193192
}
194193
ModifiedByImpl instance = new ModifiedByImpl();
194+
instance.setIsPlatformClient(template.getIsPlatformClient());
195195
instance.setId(template.getId());
196196
instance.setType(template.getType());
197197
instance.setClientId(template.getClientId());
198198
instance.setAnonymousId(template.getAnonymousId());
199199
instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer()));
200200
instance.setAssociate(com.commercetools.history.models.common.Reference.deepCopy(template.getAssociate()));
201-
instance.setIsPlatformClient(template.getIsPlatformClient());
202201
return instance;
203202
}
204203

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java

+25-25
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@
1616
* <div class=code-example>
1717
* <pre><code class='java'>
1818
* ModifiedBy modifiedBy = ModifiedBy.builder()
19-
* .id("{id}")
20-
* .type("{type}")
2119
* .isPlatformClient(true)
20+
* .type("{type}")
2221
* .build()
2322
* </code></pre>
2423
* </div>
2524
*/
2625
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2726
public class ModifiedByBuilder implements Builder<ModifiedBy> {
2827

28+
private Boolean isPlatformClient;
29+
30+
@Nullable
2931
private String id;
3032

3133
private String type;
@@ -42,16 +44,25 @@ public class ModifiedByBuilder implements Builder<ModifiedBy> {
4244
@Nullable
4345
private com.commercetools.history.models.common.Reference associate;
4446

45-
private Boolean isPlatformClient;
47+
/**
48+
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
49+
* @param isPlatformClient value to be set
50+
* @return Builder
51+
*/
52+
53+
public ModifiedByBuilder isPlatformClient(final Boolean isPlatformClient) {
54+
this.isPlatformClient = isPlatformClient;
55+
return this;
56+
}
4657

4758
/**
4859
* <p>ID of the Merchant Center user who made the change.</p>
49-
* <p>Present only if the change was made in the Merchant Center.</p>
60+
* <p>Present only if <code>isPlatformClient</code> is <code>true</code>.</p>
5061
* @param id value to be set
5162
* @return Builder
5263
*/
5364

54-
public ModifiedByBuilder id(final String id) {
65+
public ModifiedByBuilder id(@Nullable final String id) {
5566
this.id = id;
5667
return this;
5768
}
@@ -170,21 +181,20 @@ public ModifiedByBuilder associate(@Nullable final com.commercetools.history.mod
170181

171182
/**
172183
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
173-
* @param isPlatformClient value to be set
174-
* @return Builder
184+
* @return isPlatformClient
175185
*/
176186

177-
public ModifiedByBuilder isPlatformClient(final Boolean isPlatformClient) {
178-
this.isPlatformClient = isPlatformClient;
179-
return this;
187+
public Boolean getIsPlatformClient() {
188+
return this.isPlatformClient;
180189
}
181190

182191
/**
183192
* <p>ID of the Merchant Center user who made the change.</p>
184-
* <p>Present only if the change was made in the Merchant Center.</p>
193+
* <p>Present only if <code>isPlatformClient</code> is <code>true</code>.</p>
185194
* @return id
186195
*/
187196

197+
@Nullable
188198
public String getId() {
189199
return this.id;
190200
}
@@ -245,32 +255,22 @@ public com.commercetools.history.models.common.Reference getAssociate() {
245255
return this.associate;
246256
}
247257

248-
/**
249-
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
250-
* @return isPlatformClient
251-
*/
252-
253-
public Boolean getIsPlatformClient() {
254-
return this.isPlatformClient;
255-
}
256-
257258
/**
258259
* builds ModifiedBy with checking for non-null required values
259260
* @return ModifiedBy
260261
*/
261262
public ModifiedBy build() {
262-
Objects.requireNonNull(id, ModifiedBy.class + ": id is missing");
263-
Objects.requireNonNull(type, ModifiedBy.class + ": type is missing");
264263
Objects.requireNonNull(isPlatformClient, ModifiedBy.class + ": isPlatformClient is missing");
265-
return new ModifiedByImpl(id, type, clientId, anonymousId, customer, associate, isPlatformClient);
264+
Objects.requireNonNull(type, ModifiedBy.class + ": type is missing");
265+
return new ModifiedByImpl(isPlatformClient, id, type, clientId, anonymousId, customer, associate);
266266
}
267267

268268
/**
269269
* builds ModifiedBy without checking for non-null required values
270270
* @return ModifiedBy
271271
*/
272272
public ModifiedBy buildUnchecked() {
273-
return new ModifiedByImpl(id, type, clientId, anonymousId, customer, associate, isPlatformClient);
273+
return new ModifiedByImpl(isPlatformClient, id, type, clientId, anonymousId, customer, associate);
274274
}
275275

276276
/**
@@ -288,13 +288,13 @@ public static ModifiedByBuilder of() {
288288
*/
289289
public static ModifiedByBuilder of(final ModifiedBy template) {
290290
ModifiedByBuilder builder = new ModifiedByBuilder();
291+
builder.isPlatformClient = template.getIsPlatformClient();
291292
builder.id = template.getId();
292293
builder.type = template.getType();
293294
builder.clientId = template.getClientId();
294295
builder.anonymousId = template.getAnonymousId();
295296
builder.customer = template.getCustomer();
296297
builder.associate = template.getAssociate();
297-
builder.isPlatformClient = template.getIsPlatformClient();
298298
return builder;
299299
}
300300

commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByImpl.java

+23-23
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2323
public class ModifiedByImpl implements ModifiedBy, ModelBase {
2424

25+
private Boolean isPlatformClient;
26+
2527
private String id;
2628

2729
private String type;
@@ -34,24 +36,22 @@ public class ModifiedByImpl implements ModifiedBy, ModelBase {
3436

3537
private com.commercetools.history.models.common.Reference associate;
3638

37-
private Boolean isPlatformClient;
38-
3939
/**
4040
* create instance with all properties
4141
*/
4242
@JsonCreator
43-
ModifiedByImpl(@JsonProperty("id") final String id, @JsonProperty("type") final String type,
43+
ModifiedByImpl(@JsonProperty("isPlatformClient") final Boolean isPlatformClient,
44+
@JsonProperty("id") final String id, @JsonProperty("type") final String type,
4445
@JsonProperty("clientId") final String clientId, @JsonProperty("anonymousId") final String anonymousId,
4546
@JsonProperty("customer") final com.commercetools.history.models.common.Reference customer,
46-
@JsonProperty("associate") final com.commercetools.history.models.common.Reference associate,
47-
@JsonProperty("isPlatformClient") final Boolean isPlatformClient) {
47+
@JsonProperty("associate") final com.commercetools.history.models.common.Reference associate) {
48+
this.isPlatformClient = isPlatformClient;
4849
this.id = id;
4950
this.type = type;
5051
this.clientId = clientId;
5152
this.anonymousId = anonymousId;
5253
this.customer = customer;
5354
this.associate = associate;
54-
this.isPlatformClient = isPlatformClient;
5555
}
5656

5757
/**
@@ -60,9 +60,17 @@ public class ModifiedByImpl implements ModifiedBy, ModelBase {
6060
public ModifiedByImpl() {
6161
}
6262

63+
/**
64+
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
65+
*/
66+
67+
public Boolean getIsPlatformClient() {
68+
return this.isPlatformClient;
69+
}
70+
6371
/**
6472
* <p>ID of the Merchant Center user who made the change.</p>
65-
* <p>Present only if the change was made in the Merchant Center.</p>
73+
* <p>Present only if <code>isPlatformClient</code> is <code>true</code>.</p>
6674
*/
6775

6876
public String getId() {
@@ -116,12 +124,8 @@ public com.commercetools.history.models.common.Reference getAssociate() {
116124
return this.associate;
117125
}
118126

119-
/**
120-
* <p><code>true</code> if the change was made using the Merchant Center or ImpEx.</p>
121-
*/
122-
123-
public Boolean getIsPlatformClient() {
124-
return this.isPlatformClient;
127+
public void setIsPlatformClient(final Boolean isPlatformClient) {
128+
this.isPlatformClient = isPlatformClient;
125129
}
126130

127131
public void setId(final String id) {
@@ -148,10 +152,6 @@ public void setAssociate(final com.commercetools.history.models.common.Reference
148152
this.associate = associate;
149153
}
150154

151-
public void setIsPlatformClient(final Boolean isPlatformClient) {
152-
this.isPlatformClient = isPlatformClient;
153-
}
154-
155155
@Override
156156
public boolean equals(Object o) {
157157
if (this == o)
@@ -162,7 +162,8 @@ public boolean equals(Object o) {
162162

163163
ModifiedByImpl that = (ModifiedByImpl) o;
164164

165-
return new EqualsBuilder().append(id, that.id)
165+
return new EqualsBuilder().append(isPlatformClient, that.isPlatformClient)
166+
.append(id, that.id)
166167
.append(type, that.type)
167168
.append(clientId, that.clientId)
168169
.append(anonymousId, that.anonymousId)
@@ -175,31 +176,30 @@ public boolean equals(Object o) {
175176
.append(anonymousId, that.anonymousId)
176177
.append(customer, that.customer)
177178
.append(associate, that.associate)
178-
.append(isPlatformClient, that.isPlatformClient)
179179
.isEquals();
180180
}
181181

182182
@Override
183183
public int hashCode() {
184-
return new HashCodeBuilder(17, 37).append(id)
184+
return new HashCodeBuilder(17, 37).append(isPlatformClient)
185+
.append(id)
185186
.append(type)
186187
.append(clientId)
187188
.append(anonymousId)
188189
.append(customer)
189190
.append(associate)
190-
.append(isPlatformClient)
191191
.toHashCode();
192192
}
193193

194194
@Override
195195
public String toString() {
196-
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id)
196+
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("isPlatformClient", isPlatformClient)
197+
.append("id", id)
197198
.append("type", type)
198199
.append("clientId", clientId)
199200
.append("anonymousId", anonymousId)
200201
.append("customer", customer)
201202
.append("associate", associate)
202-
.append("isPlatformClient", isPlatformClient)
203203
.build();
204204
}
205205

0 commit comments

Comments
 (0)