-
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 pull request #507 from commercetools/gen-sdk-updates
- Loading branch information
Showing
532 changed files
with
28,460 additions
and
192 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
120 changes: 120 additions & 0 deletions
120
.../src/main/java-generated/com/commercetools/api/client/ByProjectKeyApiClientsByIDHead.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,120 @@ | ||
|
||
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 if an API Client exists for a given <code>id</code>. Returns a <code>200 OK</code> status if the API Client exists 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}") | ||
* .apiClients() | ||
* .withId("{ID}") | ||
* .head() | ||
* .execute() | ||
* }</code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public class ByProjectKeyApiClientsByIDHead | ||
extends TypeApiMethod<ByProjectKeyApiClientsByIDHead, com.fasterxml.jackson.databind.JsonNode> | ||
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyApiClientsByIDHead>, | ||
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyApiClientsByIDHead> { | ||
|
||
@Override | ||
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() { | ||
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() { | ||
}; | ||
} | ||
|
||
private String projectKey; | ||
private String ID; | ||
|
||
public ByProjectKeyApiClientsByIDHead(final ApiHttpClient apiHttpClient, String projectKey, String ID) { | ||
super(apiHttpClient); | ||
this.projectKey = projectKey; | ||
this.ID = ID; | ||
} | ||
|
||
public ByProjectKeyApiClientsByIDHead(ByProjectKeyApiClientsByIDHead t) { | ||
super(t); | ||
this.projectKey = t.projectKey; | ||
this.ID = t.ID; | ||
} | ||
|
||
@Override | ||
protected ApiHttpRequest buildHttpRequest() { | ||
List<String> params = new ArrayList<>(getQueryParamUriStrings()); | ||
String httpRequestPath = String.format("%s/api-clients/%s", this.projectKey, this.ID); | ||
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 String getID() { | ||
return this.ID; | ||
} | ||
|
||
public void setProjectKey(final String projectKey) { | ||
this.projectKey = projectKey; | ||
} | ||
|
||
public void setID(final String ID) { | ||
this.ID = ID; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
|
||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
ByProjectKeyApiClientsByIDHead that = (ByProjectKeyApiClientsByIDHead) o; | ||
|
||
return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); | ||
} | ||
|
||
@Override | ||
protected ByProjectKeyApiClientsByIDHead copy() { | ||
return new ByProjectKeyApiClientsByIDHead(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
Oops, something went wrong.