Skip to content

Commit 06c4b8d

Browse files
committed
build(codegen): updating SDK
1 parent 49e14e5 commit 06c4b8d

File tree

429 files changed

+31154
-2273
lines changed

Some content is hidden

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

429 files changed

+31154
-2273
lines changed

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 188 additions & 26 deletions
Large diffs are not rendered by default.

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
import org.apache.commons.lang3.builder.HashCodeBuilder;
2121

2222
/**
23-
* <p>Gets the current or staged representation of a Product by its ID from the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.</p>
24-
* <p>If ProductSelection is used, it affects the availability of the Product in the specified Store.</p>
23+
* <p>Gets the current or staged representation of a Product by its ID from the specified Store. If the Store has defined some languages, countries, distribution or supply Channels, they are used for projections based on locale, price and inventory.</p>
2524
* <p>When used with an API Client that has the <code>view_published_products:{projectKey}</code> scope, this endpoint only returns published (current) Product Projections.</p>
2625
*
2726
* <hr>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
import org.apache.commons.lang3.builder.HashCodeBuilder;
2121

2222
/**
23-
* <p>Gets the current or staged representation of a Product by its key from the specified Store. If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection, they are used for projections based on locale, price and inventory.</p>
24-
* <p>If ProductSelection is used, it affects the availability of the Product in the specified Store.</p>
23+
* <p>Gets the current or staged representation of a Product by its key from the specified Store. If the Store has defined some languages, countries, distribution or supply Channels, they are used for projections based on locale, price and inventory.</p>
2524
* <p>When used with an API Client that has the <code>view_published_products:{projectKey}</code> scope, this endpoint only returns published (current) Product Projections.</p>
2625
*
2726
* <hr>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsRequestBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ public ByProjectKeyProductsByIDRequestBuilder withId(String ID) {
4545
return new ByProjectKeyProductsByIDRequestBuilder(apiHttpClient, projectKey, ID);
4646
}
4747

48+
public ByProjectKeyProductsSearchRequestBuilder search() {
49+
return new ByProjectKeyProductsSearchRequestBuilder(apiHttpClient, projectKey);
50+
}
51+
4852
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import java.net.URI;
5+
import java.time.Duration;
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
import java.util.concurrent.CompletableFuture;
9+
10+
import com.fasterxml.jackson.core.type.TypeReference;
11+
12+
import io.vrap.rmf.base.client.*;
13+
import io.vrap.rmf.base.client.utils.Generated;
14+
15+
import org.apache.commons.lang3.builder.EqualsBuilder;
16+
import org.apache.commons.lang3.builder.HashCodeBuilder;
17+
18+
/**
19+
* <p>Checks whether a search index for the Project's Products exists.</p>
20+
*
21+
* <hr>
22+
* <div class=code-example>
23+
* <pre><code class='java'>{@code
24+
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot
25+
* .withProjectKey("{projectKey}")
26+
* .products()
27+
* .search()
28+
* .head()
29+
* .execute()
30+
* }</code></pre>
31+
* </div>
32+
*/
33+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
34+
public class ByProjectKeyProductsSearchHead
35+
extends TypeApiMethod<ByProjectKeyProductsSearchHead, com.fasterxml.jackson.databind.JsonNode>
36+
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchHead>,
37+
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyProductsSearchHead> {
38+
39+
@Override
40+
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() {
41+
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() {
42+
};
43+
}
44+
45+
private String projectKey;
46+
47+
public ByProjectKeyProductsSearchHead(final ApiHttpClient apiHttpClient, String projectKey) {
48+
super(apiHttpClient);
49+
this.projectKey = projectKey;
50+
}
51+
52+
public ByProjectKeyProductsSearchHead(ByProjectKeyProductsSearchHead t) {
53+
super(t);
54+
this.projectKey = t.projectKey;
55+
}
56+
57+
@Override
58+
protected ApiHttpRequest buildHttpRequest() {
59+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
60+
String httpRequestPath = String.format("%s/products/search", this.projectKey);
61+
if (!params.isEmpty()) {
62+
httpRequestPath += "?" + String.join("&", params);
63+
}
64+
return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
65+
}
66+
67+
@Override
68+
public ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode> executeBlocking(final ApiHttpClient client,
69+
final Duration timeout) {
70+
return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class);
71+
}
72+
73+
@Override
74+
public CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> execute(
75+
final ApiHttpClient client) {
76+
return execute(client, com.fasterxml.jackson.databind.JsonNode.class);
77+
}
78+
79+
public String getProjectKey() {
80+
return this.projectKey;
81+
}
82+
83+
public void setProjectKey(final String projectKey) {
84+
this.projectKey = projectKey;
85+
}
86+
87+
@Override
88+
public boolean equals(Object o) {
89+
if (this == o)
90+
return true;
91+
92+
if (o == null || getClass() != o.getClass())
93+
return false;
94+
95+
ByProjectKeyProductsSearchHead that = (ByProjectKeyProductsSearchHead) o;
96+
97+
return new EqualsBuilder().append(projectKey, that.projectKey).isEquals();
98+
}
99+
100+
@Override
101+
public int hashCode() {
102+
return new HashCodeBuilder(17, 37).append(projectKey).toHashCode();
103+
}
104+
105+
@Override
106+
protected ByProjectKeyProductsSearchHead copy() {
107+
return new ByProjectKeyProductsSearchHead(this);
108+
}
109+
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import java.net.URI;
5+
import java.time.Duration;
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
import java.util.concurrent.CompletableFuture;
9+
10+
import com.fasterxml.jackson.core.type.TypeReference;
11+
12+
import io.vrap.rmf.base.client.*;
13+
import io.vrap.rmf.base.client.utils.Generated;
14+
15+
import org.apache.commons.lang3.builder.EqualsBuilder;
16+
import org.apache.commons.lang3.builder.HashCodeBuilder;
17+
18+
/**
19+
*
20+
*
21+
* <hr>
22+
* <div class=code-example>
23+
* <pre><code class='java'>{@code
24+
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> result = apiRoot
25+
* .withProjectKey("{projectKey}")
26+
* .products()
27+
* .search()
28+
* .post(null)
29+
* .execute()
30+
* }</code></pre>
31+
* </div>
32+
*/
33+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
34+
public class ByProjectKeyProductsSearchPost extends
35+
TypeBodyApiMethod<ByProjectKeyProductsSearchPost, com.commercetools.api.models.product_search.ProductPagedSearchResponse, com.commercetools.api.models.product_search.ProductSearchRequest>
36+
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchPost> {
37+
38+
@Override
39+
public TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse> resultType() {
40+
return new TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse>() {
41+
};
42+
}
43+
44+
private String projectKey;
45+
46+
private com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest;
47+
48+
public ByProjectKeyProductsSearchPost(final ApiHttpClient apiHttpClient, String projectKey,
49+
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
50+
super(apiHttpClient);
51+
this.projectKey = projectKey;
52+
this.productSearchRequest = productSearchRequest;
53+
}
54+
55+
public ByProjectKeyProductsSearchPost(ByProjectKeyProductsSearchPost t) {
56+
super(t);
57+
this.projectKey = t.projectKey;
58+
this.productSearchRequest = t.productSearchRequest;
59+
}
60+
61+
@Override
62+
protected ApiHttpRequest buildHttpRequest() {
63+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
64+
String httpRequestPath = String.format("%s/products/search", this.projectKey);
65+
if (!params.isEmpty()) {
66+
httpRequestPath += "?" + String.join("&", params);
67+
}
68+
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
69+
io.vrap.rmf.base.client.utils.json.JsonUtils
70+
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(productSearchRequest)));
71+
72+
}
73+
74+
@Override
75+
public ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse> executeBlocking(
76+
final ApiHttpClient client, final Duration timeout) {
77+
return executeBlocking(client, timeout,
78+
com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
79+
}
80+
81+
@Override
82+
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> execute(
83+
final ApiHttpClient client) {
84+
return execute(client, com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
85+
}
86+
87+
public String getProjectKey() {
88+
return this.projectKey;
89+
}
90+
91+
public void setProjectKey(final String projectKey) {
92+
this.projectKey = projectKey;
93+
}
94+
95+
public com.commercetools.api.models.product_search.ProductSearchRequest getBody() {
96+
return productSearchRequest;
97+
}
98+
99+
public ByProjectKeyProductsSearchPost withBody(
100+
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
101+
ByProjectKeyProductsSearchPost t = copy();
102+
t.productSearchRequest = productSearchRequest;
103+
return t;
104+
}
105+
106+
@Override
107+
public boolean equals(Object o) {
108+
if (this == o)
109+
return true;
110+
111+
if (o == null || getClass() != o.getClass())
112+
return false;
113+
114+
ByProjectKeyProductsSearchPost that = (ByProjectKeyProductsSearchPost) o;
115+
116+
return new EqualsBuilder().append(projectKey, that.projectKey)
117+
.append(productSearchRequest, that.productSearchRequest)
118+
.isEquals();
119+
}
120+
121+
@Override
122+
public int hashCode() {
123+
return new HashCodeBuilder(17, 37).append(projectKey).append(productSearchRequest).toHashCode();
124+
}
125+
126+
@Override
127+
protected ByProjectKeyProductsSearchPost copy() {
128+
return new ByProjectKeyProductsSearchPost(this);
129+
}
130+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import java.net.URI;
5+
import java.nio.charset.StandardCharsets;
6+
import java.time.Duration;
7+
import java.util.ArrayList;
8+
import java.util.List;
9+
import java.util.concurrent.CompletableFuture;
10+
11+
import com.fasterxml.jackson.core.type.TypeReference;
12+
13+
import io.vrap.rmf.base.client.*;
14+
import io.vrap.rmf.base.client.utils.Generated;
15+
16+
import org.apache.commons.lang3.builder.EqualsBuilder;
17+
import org.apache.commons.lang3.builder.HashCodeBuilder;
18+
19+
/**
20+
*
21+
*
22+
* <hr>
23+
* <div class=code-example>
24+
* <pre><code class='java'>{@code
25+
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> result = apiRoot
26+
* .withProjectKey("{projectKey}")
27+
* .products()
28+
* .search()
29+
* .post("")
30+
* .execute()
31+
* }</code></pre>
32+
* </div>
33+
*/
34+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
35+
public class ByProjectKeyProductsSearchPostString extends
36+
StringBodyApiMethod<ByProjectKeyProductsSearchPostString, com.commercetools.api.models.product_search.ProductPagedSearchResponse>
37+
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchPostString> {
38+
39+
@Override
40+
public TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse> resultType() {
41+
return new TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse>() {
42+
};
43+
}
44+
45+
private String projectKey;
46+
47+
private String productSearchRequest;
48+
49+
public ByProjectKeyProductsSearchPostString(final ApiHttpClient apiHttpClient, String projectKey,
50+
String productSearchRequest) {
51+
super(apiHttpClient);
52+
this.projectKey = projectKey;
53+
this.productSearchRequest = productSearchRequest;
54+
}
55+
56+
public ByProjectKeyProductsSearchPostString(ByProjectKeyProductsSearchPostString t) {
57+
super(t);
58+
this.projectKey = t.projectKey;
59+
this.productSearchRequest = t.productSearchRequest;
60+
}
61+
62+
@Override
63+
protected ApiHttpRequest buildHttpRequest() {
64+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
65+
String httpRequestPath = String.format("%s/products/search", this.projectKey);
66+
if (!params.isEmpty()) {
67+
httpRequestPath += "?" + String.join("&", params);
68+
}
69+
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
70+
productSearchRequest.getBytes(StandardCharsets.UTF_8));
71+
72+
}
73+
74+
@Override
75+
public ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse> executeBlocking(
76+
final ApiHttpClient client, final Duration timeout) {
77+
return executeBlocking(client, timeout,
78+
com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
79+
}
80+
81+
@Override
82+
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> execute(
83+
final ApiHttpClient client) {
84+
return execute(client, com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
85+
}
86+
87+
public String getProjectKey() {
88+
return this.projectKey;
89+
}
90+
91+
public void setProjectKey(final String projectKey) {
92+
this.projectKey = projectKey;
93+
}
94+
95+
public String getBody() {
96+
return productSearchRequest;
97+
}
98+
99+
public ByProjectKeyProductsSearchPostString withBody(String productSearchRequest) {
100+
ByProjectKeyProductsSearchPostString t = copy();
101+
t.productSearchRequest = productSearchRequest;
102+
return t;
103+
}
104+
105+
@Override
106+
public boolean equals(Object o) {
107+
if (this == o)
108+
return true;
109+
110+
if (o == null || getClass() != o.getClass())
111+
return false;
112+
113+
ByProjectKeyProductsSearchPostString that = (ByProjectKeyProductsSearchPostString) o;
114+
115+
return new EqualsBuilder().append(projectKey, that.projectKey)
116+
.append(productSearchRequest, that.productSearchRequest)
117+
.isEquals();
118+
}
119+
120+
@Override
121+
public int hashCode() {
122+
return new HashCodeBuilder(17, 37).append(projectKey).append(productSearchRequest).toHashCode();
123+
}
124+
125+
@Override
126+
protected ByProjectKeyProductsSearchPostString copy() {
127+
return new ByProjectKeyProductsSearchPostString(this);
128+
}
129+
}

0 commit comments

Comments
 (0)