Skip to content

Commit 3b06a8f

Browse files
committed
build(codegen): updating SDK
1 parent a41af1b commit 3b06a8f

17 files changed

+428
-712
lines changed

commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdDelete.java

Lines changed: 90 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
import java.net.URI;
55
import java.time.Duration;
66
import java.util.ArrayList;
7+
import java.util.Collection;
78
import java.util.List;
89
import java.util.concurrent.CompletableFuture;
10+
import java.util.function.Function;
11+
import java.util.function.Supplier;
12+
import java.util.stream.Collectors;
913

1014
import com.fasterxml.jackson.core.type.TypeReference;
1115

@@ -25,14 +29,15 @@
2529
* .withProjectKey("{projectKey}")
2630
* .applications()
2731
* .withId("{id}")
28-
* .delete(null)
32+
* .delete()
33+
* .withVersion(version)
2934
* .execute()
3035
* }</code></pre>
3136
* </div>
3237
*/
3338
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
3439
public class ByProjectKeyApplicationsByIdDelete extends
35-
TypeBodyApiMethod<ByProjectKeyApplicationsByIdDelete, com.commercetools.checkout.models.application.Application, com.commercetools.checkout.models.application.Application>
40+
TypeApiMethod<ByProjectKeyApplicationsByIdDelete, com.commercetools.checkout.models.application.Application>
3641
implements
3742
com.commercetools.checkout.client.Secured_by_manage_applicationsTrait<ByProjectKeyApplicationsByIdDelete> {
3843

@@ -45,21 +50,16 @@ public TypeReference<com.commercetools.checkout.models.application.Application>
4550
private String projectKey;
4651
private String id;
4752

48-
private com.commercetools.checkout.models.application.Application application;
49-
50-
public ByProjectKeyApplicationsByIdDelete(final ApiHttpClient apiHttpClient, String projectKey, String id,
51-
com.commercetools.checkout.models.application.Application application) {
53+
public ByProjectKeyApplicationsByIdDelete(final ApiHttpClient apiHttpClient, String projectKey, String id) {
5254
super(apiHttpClient);
5355
this.projectKey = projectKey;
5456
this.id = id;
55-
this.application = application;
5657
}
5758

5859
public ByProjectKeyApplicationsByIdDelete(ByProjectKeyApplicationsByIdDelete t) {
5960
super(t);
6061
this.projectKey = t.projectKey;
6162
this.id = t.id;
62-
this.application = t.application;
6363
}
6464

6565
@Override
@@ -70,10 +70,7 @@ protected ApiHttpRequest buildHttpRequest() {
7070
if (!params.isEmpty()) {
7171
httpRequestPath += "?" + String.join("&", params);
7272
}
73-
return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(),
74-
io.vrap.rmf.base.client.utils.json.JsonUtils
75-
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(application)));
76-
73+
return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null);
7774
}
7875

7976
@Override
@@ -96,6 +93,10 @@ public String getId() {
9693
return this.id;
9794
}
9895

96+
public List<String> getVersion() {
97+
return this.getQueryParam("version");
98+
}
99+
99100
public void setProjectKey(final String projectKey) {
100101
this.projectKey = projectKey;
101102
}
@@ -104,15 +105,83 @@ public void setId(final String id) {
104105
this.id = id;
105106
}
106107

107-
public com.commercetools.checkout.models.application.Application getBody() {
108-
return application;
108+
/**
109+
* set version with the specified value
110+
* @param version value to be set
111+
* @param <TValue> value type
112+
* @return ByProjectKeyApplicationsByIdDelete
113+
*/
114+
public <TValue> ByProjectKeyApplicationsByIdDelete withVersion(final TValue version) {
115+
return copy().withQueryParam("version", version);
116+
}
117+
118+
/**
119+
* add additional version query parameter
120+
* @param version value to be added
121+
* @param <TValue> value type
122+
* @return ByProjectKeyApplicationsByIdDelete
123+
*/
124+
public <TValue> ByProjectKeyApplicationsByIdDelete addVersion(final TValue version) {
125+
return copy().addQueryParam("version", version);
126+
}
127+
128+
/**
129+
* set version with the specified value
130+
* @param supplier supplier for the value to be set
131+
* @return ByProjectKeyApplicationsByIdDelete
132+
*/
133+
public ByProjectKeyApplicationsByIdDelete withVersion(final Supplier<Long> supplier) {
134+
return copy().withQueryParam("version", supplier.get());
135+
}
136+
137+
/**
138+
* add additional version query parameter
139+
* @param supplier supplier for the value to be added
140+
* @return ByProjectKeyApplicationsByIdDelete
141+
*/
142+
public ByProjectKeyApplicationsByIdDelete addVersion(final Supplier<Long> supplier) {
143+
return copy().addQueryParam("version", supplier.get());
144+
}
145+
146+
/**
147+
* set version with the specified value
148+
* @param op builder for the value to be set
149+
* @return ByProjectKeyApplicationsByIdDelete
150+
*/
151+
public ByProjectKeyApplicationsByIdDelete withVersion(final Function<StringBuilder, StringBuilder> op) {
152+
return copy().withQueryParam("version", op.apply(new StringBuilder()));
153+
}
154+
155+
/**
156+
* add additional version query parameter
157+
* @param op builder for the value to be added
158+
* @return ByProjectKeyApplicationsByIdDelete
159+
*/
160+
public ByProjectKeyApplicationsByIdDelete addVersion(final Function<StringBuilder, StringBuilder> op) {
161+
return copy().addQueryParam("version", op.apply(new StringBuilder()));
162+
}
163+
164+
/**
165+
* set version with the specified values
166+
* @param version values to be set
167+
* @param <TValue> value type
168+
* @return ByProjectKeyApplicationsByIdDelete
169+
*/
170+
public <TValue> ByProjectKeyApplicationsByIdDelete withVersion(final Collection<TValue> version) {
171+
return copy().withoutQueryParam("version")
172+
.addQueryParams(
173+
version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList()));
109174
}
110175

111-
public ByProjectKeyApplicationsByIdDelete withBody(
112-
com.commercetools.checkout.models.application.Application application) {
113-
ByProjectKeyApplicationsByIdDelete t = copy();
114-
t.application = application;
115-
return t;
176+
/**
177+
* add additional version query parameters
178+
* @param version values to be added
179+
* @param <TValue> value type
180+
* @return ByProjectKeyApplicationsByIdDelete
181+
*/
182+
public <TValue> ByProjectKeyApplicationsByIdDelete addVersion(final Collection<TValue> version) {
183+
return copy().addQueryParams(
184+
version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList()));
116185
}
117186

118187
@Override
@@ -125,15 +194,12 @@ public boolean equals(Object o) {
125194

126195
ByProjectKeyApplicationsByIdDelete that = (ByProjectKeyApplicationsByIdDelete) o;
127196

128-
return new EqualsBuilder().append(projectKey, that.projectKey)
129-
.append(id, that.id)
130-
.append(application, that.application)
131-
.isEquals();
197+
return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals();
132198
}
133199

134200
@Override
135201
public int hashCode() {
136-
return new HashCodeBuilder(17, 37).append(projectKey).append(id).append(application).toHashCode();
202+
return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode();
137203
}
138204

139205
@Override

commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdDeleteString.java

Lines changed: 0 additions & 141 deletions
This file was deleted.

commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdRequestBuilder.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,12 @@ public ByProjectKeyApplicationsByIdPost post(
4343
op.apply(com.commercetools.checkout.models.application.ApplicationUpdateActionsBuilder.of()).build());
4444
}
4545

46-
public ByProjectKeyApplicationsByIdDelete delete(
47-
com.commercetools.checkout.models.application.Application application) {
48-
return new ByProjectKeyApplicationsByIdDelete(apiHttpClient, projectKey, id, application);
46+
public ByProjectKeyApplicationsByIdDelete delete() {
47+
return new ByProjectKeyApplicationsByIdDelete(apiHttpClient, projectKey, id);
4948
}
5049

51-
public ByProjectKeyApplicationsByIdDeleteString delete(final String application) {
52-
return new ByProjectKeyApplicationsByIdDeleteString(apiHttpClient, projectKey, id, application);
53-
}
54-
55-
public ByProjectKeyApplicationsByIdDelete delete(
56-
UnaryOperator<com.commercetools.checkout.models.application.ApplicationBuilder> op) {
57-
return delete(op.apply(com.commercetools.checkout.models.application.ApplicationBuilder.of()).build());
50+
public <TValue> ByProjectKeyApplicationsByIdDelete delete(TValue version) {
51+
return delete().withVersion(version);
5852
}
5953

6054
}

0 commit comments

Comments
 (0)