-
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.
Merge branch 'main' into SUPPORT-28804_add_deserializer_for_import_api
- Loading branch information
Showing
75 changed files
with
2,033 additions
and
161 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,49 @@ | ||
**Api changes** | ||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
|
||
- added type `ApprovalRuleSetCustomFieldAction` | ||
- added type `ApprovalRuleSetCustomTypeAction` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Property(s)</summary> | ||
|
||
- added property `custom` to type `ApprovalRule` | ||
- added property `source` to type `EventBridgeDestination` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Enum(s)</summary> | ||
|
||
- added enum `approval-rule` to type `CustomFieldReferenceValue` | ||
- added enum `approval-rule` to type `ResourceTypeId` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Method(s)</summary> | ||
|
||
- added method `apiRoot.withProjectKey().productTailoring().head()` | ||
</details> | ||
|
||
**Import changes** | ||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
|
||
- added type `InvalidFieldsUpdateError` | ||
- added type `NewMasterVariantAdditionNotAllowedError` | ||
</details> | ||
|
||
**History changes** | ||
|
||
<details> | ||
<summary>Required Property(s)</summary> | ||
|
||
- changed property `id` of type `ModifiedBy` to be optional | ||
</details> | ||
|
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
195 changes: 195 additions & 0 deletions
195
...rc/main/java-generated/com/commercetools/api/client/ByProjectKeyProductTailoringHead.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,195 @@ | ||
|
||
package com.commercetools.api.client; | ||
|
||
import java.net.URI; | ||
import java.time.Duration; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.concurrent.CompletableFuture; | ||
import java.util.function.Function; | ||
import java.util.function.Supplier; | ||
import java.util.stream.Collectors; | ||
|
||
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 if a ProductTailoring exists for a given Query Predicate. Returns a <code>200 OK</code> status if any ProductTailoring match the Query Predicate or a <code>404 Not Found</code> otherwise.</p> | ||
* | ||
* <hr> | ||
* <div class=code-example> | ||
* <pre><code class='java'>{@code | ||
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot | ||
* .withProjectKey("{projectKey}") | ||
* .productTailoring() | ||
* .head() | ||
* .execute() | ||
* }</code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public class ByProjectKeyProductTailoringHead | ||
extends TypeApiMethod<ByProjectKeyProductTailoringHead, com.fasterxml.jackson.databind.JsonNode> | ||
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductTailoringHead>, | ||
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyProductTailoringHead> { | ||
|
||
@Override | ||
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() { | ||
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() { | ||
}; | ||
} | ||
|
||
private String projectKey; | ||
|
||
public ByProjectKeyProductTailoringHead(final ApiHttpClient apiHttpClient, String projectKey) { | ||
super(apiHttpClient); | ||
this.projectKey = projectKey; | ||
} | ||
|
||
public ByProjectKeyProductTailoringHead(ByProjectKeyProductTailoringHead t) { | ||
super(t); | ||
this.projectKey = t.projectKey; | ||
} | ||
|
||
@Override | ||
protected ApiHttpRequest buildHttpRequest() { | ||
List<String> params = new ArrayList<>(getQueryParamUriStrings()); | ||
String httpRequestPath = String.format("%s/product-tailoring", encodePathParam(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 List<String> getWhere() { | ||
return this.getQueryParam("where"); | ||
} | ||
|
||
public void setProjectKey(final String projectKey) { | ||
this.projectKey = projectKey; | ||
} | ||
|
||
/** | ||
* set where with the specified value | ||
* @param where value to be set | ||
* @param <TValue> value type | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public <TValue> ByProjectKeyProductTailoringHead withWhere(final TValue where) { | ||
return copy().withQueryParam("where", where); | ||
} | ||
|
||
/** | ||
* add additional where query parameter | ||
* @param where value to be added | ||
* @param <TValue> value type | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public <TValue> ByProjectKeyProductTailoringHead addWhere(final TValue where) { | ||
return copy().addQueryParam("where", where); | ||
} | ||
|
||
/** | ||
* set where with the specified value | ||
* @param supplier supplier for the value to be set | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public ByProjectKeyProductTailoringHead withWhere(final Supplier<String> supplier) { | ||
return copy().withQueryParam("where", supplier.get()); | ||
} | ||
|
||
/** | ||
* add additional where query parameter | ||
* @param supplier supplier for the value to be added | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public ByProjectKeyProductTailoringHead addWhere(final Supplier<String> supplier) { | ||
return copy().addQueryParam("where", supplier.get()); | ||
} | ||
|
||
/** | ||
* set where with the specified value | ||
* @param op builder for the value to be set | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public ByProjectKeyProductTailoringHead withWhere(final Function<StringBuilder, StringBuilder> op) { | ||
return copy().withQueryParam("where", op.apply(new StringBuilder())); | ||
} | ||
|
||
/** | ||
* add additional where query parameter | ||
* @param op builder for the value to be added | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public ByProjectKeyProductTailoringHead addWhere(final Function<StringBuilder, StringBuilder> op) { | ||
return copy().addQueryParam("where", op.apply(new StringBuilder())); | ||
} | ||
|
||
/** | ||
* set where with the specified values | ||
* @param where values to be set | ||
* @param <TValue> value type | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public <TValue> ByProjectKeyProductTailoringHead withWhere(final Collection<TValue> where) { | ||
return copy().withoutQueryParam("where") | ||
.addQueryParams( | ||
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); | ||
} | ||
|
||
/** | ||
* add additional where query parameters | ||
* @param where values to be added | ||
* @param <TValue> value type | ||
* @return ByProjectKeyProductTailoringHead | ||
*/ | ||
public <TValue> ByProjectKeyProductTailoringHead addWhere(final Collection<TValue> where) { | ||
return copy().addQueryParams( | ||
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
|
||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
ByProjectKeyProductTailoringHead that = (ByProjectKeyProductTailoringHead) o; | ||
|
||
return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); | ||
} | ||
|
||
@Override | ||
protected ByProjectKeyProductTailoringHead copy() { | ||
return new ByProjectKeyProductTailoringHead(this); | ||
} | ||
} |
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
Oops, something went wrong.