Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 12, 2024
1 parent 49e14e5 commit 06c4b8d
Show file tree
Hide file tree
Showing 429 changed files with 31,154 additions and 2,273 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <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>
* <p>If ProductSelection is used, it affects the availability of the Product in the specified Store.</p>
* <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>
* <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>
*
* <hr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <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>
* <p>If ProductSelection is used, it affects the availability of the Product in the specified Store.</p>
* <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>
* <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>
*
* <hr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ public ByProjectKeyProductsByIDRequestBuilder withId(String ID) {
return new ByProjectKeyProductsByIDRequestBuilder(apiHttpClient, projectKey, ID);
}

public ByProjectKeyProductsSearchRequestBuilder search() {
return new ByProjectKeyProductsSearchRequestBuilder(apiHttpClient, projectKey);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

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

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks whether a search index for the Project's Products exists.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot
* .withProjectKey("{projectKey}")
* .products()
* .search()
* .head()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyProductsSearchHead
extends TypeApiMethod<ByProjectKeyProductsSearchHead, com.fasterxml.jackson.databind.JsonNode>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchHead>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyProductsSearchHead> {

@Override
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() {
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() {
};
}

private String projectKey;

public ByProjectKeyProductsSearchHead(final ApiHttpClient apiHttpClient, String projectKey) {
super(apiHttpClient);
this.projectKey = projectKey;
}

public ByProjectKeyProductsSearchHead(ByProjectKeyProductsSearchHead t) {
super(t);
this.projectKey = t.projectKey;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/products/search", this.projectKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
}

@Override
public ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode> executeBlocking(final ApiHttpClient client,
final Duration timeout) {
return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> execute(
final ApiHttpClient client) {
return execute(client, com.fasterxml.jackson.databind.JsonNode.class);
}

public String getProjectKey() {
return this.projectKey;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyProductsSearchHead that = (ByProjectKeyProductsSearchHead) o;

return new EqualsBuilder().append(projectKey, that.projectKey).isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).toHashCode();
}

@Override
protected ByProjectKeyProductsSearchHead copy() {
return new ByProjectKeyProductsSearchHead(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

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

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .products()
* .search()
* .post(null)
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyProductsSearchPost extends
TypeBodyApiMethod<ByProjectKeyProductsSearchPost, com.commercetools.api.models.product_search.ProductPagedSearchResponse, com.commercetools.api.models.product_search.ProductSearchRequest>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchPost> {

@Override
public TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse> resultType() {
return new TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse>() {
};
}

private String projectKey;

private com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest;

public ByProjectKeyProductsSearchPost(final ApiHttpClient apiHttpClient, String projectKey,
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
super(apiHttpClient);
this.projectKey = projectKey;
this.productSearchRequest = productSearchRequest;
}

public ByProjectKeyProductsSearchPost(ByProjectKeyProductsSearchPost t) {
super(t);
this.projectKey = t.projectKey;
this.productSearchRequest = t.productSearchRequest;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/products/search", this.projectKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
io.vrap.rmf.base.client.utils.json.JsonUtils
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(productSearchRequest)));

}

@Override
public ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse> executeBlocking(
final ApiHttpClient client, final Duration timeout) {
return executeBlocking(client, timeout,
com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> execute(
final ApiHttpClient client) {
return execute(client, com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

public String getProjectKey() {
return this.projectKey;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

public com.commercetools.api.models.product_search.ProductSearchRequest getBody() {
return productSearchRequest;
}

public ByProjectKeyProductsSearchPost withBody(
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
ByProjectKeyProductsSearchPost t = copy();
t.productSearchRequest = productSearchRequest;
return t;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyProductsSearchPost that = (ByProjectKeyProductsSearchPost) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(productSearchRequest, that.productSearchRequest)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).append(productSearchRequest).toHashCode();
}

@Override
protected ByProjectKeyProductsSearchPost copy() {
return new ByProjectKeyProductsSearchPost(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@

package com.commercetools.api.client;

import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

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

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .products()
* .search()
* .post("")
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyProductsSearchPostString extends
StringBodyApiMethod<ByProjectKeyProductsSearchPostString, com.commercetools.api.models.product_search.ProductPagedSearchResponse>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchPostString> {

@Override
public TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse> resultType() {
return new TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse>() {
};
}

private String projectKey;

private String productSearchRequest;

public ByProjectKeyProductsSearchPostString(final ApiHttpClient apiHttpClient, String projectKey,
String productSearchRequest) {
super(apiHttpClient);
this.projectKey = projectKey;
this.productSearchRequest = productSearchRequest;
}

public ByProjectKeyProductsSearchPostString(ByProjectKeyProductsSearchPostString t) {
super(t);
this.projectKey = t.projectKey;
this.productSearchRequest = t.productSearchRequest;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/products/search", this.projectKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
productSearchRequest.getBytes(StandardCharsets.UTF_8));

}

@Override
public ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse> executeBlocking(
final ApiHttpClient client, final Duration timeout) {
return executeBlocking(client, timeout,
com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> execute(
final ApiHttpClient client) {
return execute(client, com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

public String getProjectKey() {
return this.projectKey;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

public String getBody() {
return productSearchRequest;
}

public ByProjectKeyProductsSearchPostString withBody(String productSearchRequest) {
ByProjectKeyProductsSearchPostString t = copy();
t.productSearchRequest = productSearchRequest;
return t;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyProductsSearchPostString that = (ByProjectKeyProductsSearchPostString) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(productSearchRequest, that.productSearchRequest)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).append(productSearchRequest).toHashCode();
}

@Override
protected ByProjectKeyProductsSearchPostString copy() {
return new ByProjectKeyProductsSearchPostString(this);
}
}
Loading

0 comments on commit 06c4b8d

Please sign in to comment.