44import java .net .URI ;
55import java .time .Duration ;
66import java .util .ArrayList ;
7+ import java .util .Collection ;
78import java .util .List ;
89import java .util .concurrent .CompletableFuture ;
10+ import java .util .function .Function ;
11+ import java .util .function .Supplier ;
12+ import java .util .stream .Collectors ;
913
1014import com .fasterxml .jackson .core .type .TypeReference ;
1115
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" )
3439public 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
0 commit comments