32
32
* .version(0.3)
33
33
* .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
34
34
* .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
35
- * .plusChanges(changesBuilder -> changesBuilder)
36
35
* .destination(destinationBuilder -> destinationBuilder)
37
36
* .plusMessages(messagesBuilder -> messagesBuilder)
37
+ * .plusChanges(changesBuilder -> changesBuilder)
38
38
* .plusEvents(eventsBuilder -> eventsBuilder)
39
39
* .format(formatBuilder -> formatBuilder)
40
40
* .status(SubscriptionHealthStatus.HEALTHY)
@@ -95,15 +95,6 @@ public interface Subscription extends BaseResource, com.commercetools.api.models
95
95
@ JsonProperty ("createdBy" )
96
96
public CreatedBy getCreatedBy ();
97
97
98
- /**
99
- * <p>Changes subscribed to.</p>
100
- * @return changes
101
- */
102
- @ NotNull
103
- @ Valid
104
- @ JsonProperty ("changes" )
105
- public List <ChangeSubscription > getChanges ();
106
-
107
98
/**
108
99
* <p>Messaging service to which the notifications are sent.</p>
109
100
* @return destination
@@ -130,6 +121,15 @@ public interface Subscription extends BaseResource, com.commercetools.api.models
130
121
@ JsonProperty ("messages" )
131
122
public List <MessageSubscription > getMessages ();
132
123
124
+ /**
125
+ * <p>Changes subscribed to.</p>
126
+ * @return changes
127
+ */
128
+ @ NotNull
129
+ @ Valid
130
+ @ JsonProperty ("changes" )
131
+ public List <ChangeSubscription > getChanges ();
132
+
133
133
/**
134
134
* <p>Events subscribed to.</p>
135
135
* @return events
@@ -198,21 +198,6 @@ public interface Subscription extends BaseResource, com.commercetools.api.models
198
198
199
199
public void setCreatedBy (final CreatedBy createdBy );
200
200
201
- /**
202
- * <p>Changes subscribed to.</p>
203
- * @param changes values to be set
204
- */
205
-
206
- @ JsonIgnore
207
- public void setChanges (final ChangeSubscription ... changes );
208
-
209
- /**
210
- * <p>Changes subscribed to.</p>
211
- * @param changes values to be set
212
- */
213
-
214
- public void setChanges (final List <ChangeSubscription > changes );
215
-
216
201
/**
217
202
* <p>Messaging service to which the notifications are sent.</p>
218
203
* @param destination value to be set
@@ -242,6 +227,21 @@ public interface Subscription extends BaseResource, com.commercetools.api.models
242
227
243
228
public void setMessages (final List <MessageSubscription > messages );
244
229
230
+ /**
231
+ * <p>Changes subscribed to.</p>
232
+ * @param changes values to be set
233
+ */
234
+
235
+ @ JsonIgnore
236
+ public void setChanges (final ChangeSubscription ... changes );
237
+
238
+ /**
239
+ * <p>Changes subscribed to.</p>
240
+ * @param changes values to be set
241
+ */
242
+
243
+ public void setChanges (final List <ChangeSubscription > changes );
244
+
245
245
/**
246
246
* <p>Events subscribed to.</p>
247
247
* @param events values to be set
@@ -292,10 +292,10 @@ public static Subscription of(final Subscription template) {
292
292
instance .setLastModifiedAt (template .getLastModifiedAt ());
293
293
instance .setLastModifiedBy (template .getLastModifiedBy ());
294
294
instance .setCreatedBy (template .getCreatedBy ());
295
- instance .setChanges (template .getChanges ());
296
295
instance .setDestination (template .getDestination ());
297
296
instance .setKey (template .getKey ());
298
297
instance .setMessages (template .getMessages ());
298
+ instance .setChanges (template .getChanges ());
299
299
instance .setEvents (template .getEvents ());
300
300
instance .setFormat (template .getFormat ());
301
301
instance .setStatus (template .getStatus ());
@@ -320,11 +320,6 @@ public static Subscription deepCopy(@Nullable final Subscription template) {
320
320
instance .setLastModifiedBy (
321
321
com .commercetools .api .models .common .LastModifiedBy .deepCopy (template .getLastModifiedBy ()));
322
322
instance .setCreatedBy (com .commercetools .api .models .common .CreatedBy .deepCopy (template .getCreatedBy ()));
323
- instance .setChanges (Optional .ofNullable (template .getChanges ())
324
- .map (t -> t .stream ()
325
- .map (com .commercetools .api .models .subscription .ChangeSubscription ::deepCopy )
326
- .collect (Collectors .toList ()))
327
- .orElse (null ));
328
323
instance .setDestination (
329
324
com .commercetools .api .models .subscription .Destination .deepCopy (template .getDestination ()));
330
325
instance .setKey (template .getKey ());
@@ -333,6 +328,11 @@ public static Subscription deepCopy(@Nullable final Subscription template) {
333
328
.map (com .commercetools .api .models .subscription .MessageSubscription ::deepCopy )
334
329
.collect (Collectors .toList ()))
335
330
.orElse (null ));
331
+ instance .setChanges (Optional .ofNullable (template .getChanges ())
332
+ .map (t -> t .stream ()
333
+ .map (com .commercetools .api .models .subscription .ChangeSubscription ::deepCopy )
334
+ .collect (Collectors .toList ()))
335
+ .orElse (null ));
336
336
instance .setEvents (Optional .ofNullable (template .getEvents ())
337
337
.map (t -> t .stream ()
338
338
.map (com .commercetools .api .models .subscription .EventSubscription ::deepCopy )
0 commit comments