-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efc7494
commit daeac7f
Showing
280 changed files
with
28,625 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
.../src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsSearchHead.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. Returns a <code>200 OK</code> status if the index exists, a <code>404 Not Found</code> error otherwise.</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); | ||
} | ||
} |
130 changes: 130 additions & 0 deletions
130
.../src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsSearchPost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
Oops, something went wrong.