Package com.commercetools.api.client
Class ByProjectKeyVariantsByIDImagesPostString
java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.BodyApiMethod<T,TResult,TBody>
io.vrap.rmf.base.client.TypeBodyApiMethod<T,TResult,String>
io.vrap.rmf.base.client.StringBodyApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
com.commercetools.api.client.ByProjectKeyVariantsByIDImagesPostString
- All Implemented Interfaces:
ClientRequestCommand<Variant>,CreateHttpRequestCommand,HttpRequestCommand<Variant>,RequestCommand<Variant>
public class ByProjectKeyVariantsByIDImagesPostString
extends StringBodyApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
Uploads a JPEG, PNG, or a GIF image file to a Variant identified by its ID. The maximum file size of the image is 10MB.
The response status code depends on the size of the original image. If the image is small, the API responds with 200 OK, and if the image is larger, it responds with 202 Accepted. The Variant returned with a 202 Accepted status code contains a warnings field with an ImageProcessingOngoing Warning.
Produces the VariantImageAdded Message.
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.variant.Variant>> result = apiRoot
.withProjectKey("{projectKey}")
.variants()
.withId("{ID}")
.images()
.post("")
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyVariantsByIDImagesPostString(ApiHttpClient apiHttpClient, String projectKey, String ID, String file) -
Method Summary
Modifier and TypeMethodDescriptionaddFilename(Collection<TValue> filename) add additional filename query parametersadd additional filename query parameteraddFilename(Supplier<String> supplier) add additional filename query parameteraddFilename(TValue filename) add additional filename query parameteraddStaged(Collection<TValue> staged) add additional staged query parametersadd additional staged query parameteradd additional staged query parameteraddStaged(TValue staged) add additional staged query parameterbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()getID()inthashCode()inttools.jackson.core.type.TypeReference<Variant>voidvoidsetProjectKey(String projectKey) toString()withFilename(Collection<TValue> filename) set filename with the specified valuesset filename with the specified valuewithFilename(Supplier<String> supplier) set filename with the specified valuewithFilename(TValue filename) set filename with the specified valuewithStaged(Collection<TValue> staged) set staged with the specified valuesset staged with the specified valuewithStaged(Supplier<Boolean> supplier) set staged with the specified valuewithStaged(TValue staged) set staged with the specified valueMethods inherited from class io.vrap.rmf.base.client.ApiMethod
addHeader, addQueryParam, addQueryParams, contentType, createHttpRequest, execute, execute, execute, execute, execute, execute, execute, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, executeBlocking, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, getQueryParamUriString, getQueryParamUriStrings, send, sendBlocking, sendBlocking, with, with, withHeader, withHeaders, withHttpRequest, withoutHeader, withoutQueryParam, withQueryParam, withQueryParamsMethods inherited from interface io.vrap.rmf.base.client.ClientRequestCommand
executeBlockingMethods inherited from interface io.vrap.rmf.base.client.CreateHttpRequestCommand
createHttpRequestMethods inherited from interface io.vrap.rmf.base.client.RequestCommand
executeBlocking
-
Constructor Details
-
ByProjectKeyVariantsByIDImagesPostString
public ByProjectKeyVariantsByIDImagesPostString(ApiHttpClient apiHttpClient, String projectKey, String ID, String file) -
ByProjectKeyVariantsByIDImagesPostString
-
-
Method Details
-
resultType
-
executeBlocking
- Specified by:
executeBlockingin interfaceClientRequestCommand<Variant>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
-
execute
- Specified by:
executein interfaceClientRequestCommand<Variant>- Specified by:
executein classApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
-
getProjectKey
-
getID
-
getFilename
-
getStaged
-
setProjectKey
-
setID
-
withFilename
set filename with the specified value- Type Parameters:
TValue- value type- Parameters:
filename- value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addFilename
add additional filename query parameter- Type Parameters:
TValue- value type- Parameters:
filename- value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withFilename
set filename with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addFilename
add additional filename query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withFilename
public ByProjectKeyVariantsByIDImagesPostString withFilename(Function<StringBuilder, StringBuilder> op) set filename with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addFilename
public ByProjectKeyVariantsByIDImagesPostString addFilename(Function<StringBuilder, StringBuilder> op) add additional filename query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withFilename
set filename with the specified values- Type Parameters:
TValue- value type- Parameters:
filename- values to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addFilename
add additional filename query parameters- Type Parameters:
TValue- value type- Parameters:
filename- values to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withStaged
set staged with the specified value- Type Parameters:
TValue- value type- Parameters:
staged- value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addStaged
add additional staged query parameter- Type Parameters:
TValue- value type- Parameters:
staged- value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withStaged
set staged with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addStaged
add additional staged query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withStaged
public ByProjectKeyVariantsByIDImagesPostString withStaged(Function<StringBuilder, StringBuilder> op) set staged with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addStaged
add additional staged query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
withStaged
set staged with the specified values- Type Parameters:
TValue- value type- Parameters:
staged- values to be set- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
addStaged
add additional staged query parameters- Type Parameters:
TValue- value type- Parameters:
staged- values to be added- Returns:
- ByProjectKeyVariantsByIDImagesPostString
-
getBody
- Overrides:
getBodyin classStringBodyApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
-
withBody
- Overrides:
withBodyin classStringBodyApiMethod<ByProjectKeyVariantsByIDImagesPostString,Variant>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-