Package com.commercetools.api.client
Class ByProjectKeyProductsByIDImagesPost
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<ByProjectKeyProductsByIDImagesPost,Product,File>
com.commercetools.api.client.ByProjectKeyProductsByIDImagesPost
- All Implemented Interfaces:
ClientRequestCommand<Product>,CreateHttpRequestCommand,HttpRequestCommand<Product>,RequestCommand<Product>
public class ByProjectKeyProductsByIDImagesPost
extends TypeBodyApiMethod<ByProjectKeyProductsByIDImagesPost,Product,File>
Uploads a JPEG, PNG, or a GIF image file to a ProductVariant. The maximum file size of the image is 10MB. Either variant or sku is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.
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 Product returned with a 202 Accepted status code contains a warnings field with an ImageProcessingOngoing Warning.
Produces the ProductImageAdded Message.
CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product.Product>> result = apiRoot
.withProjectKey("{projectKey}")
.products()
.withId("{ID}")
.images()
.post(file)
.execute()
-
Nested Class Summary
Nested classes/interfaces inherited from class io.vrap.rmf.base.client.ApiMethod
ApiMethod.ParamEntry<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionByProjectKeyProductsByIDImagesPost(ApiHttpClient apiHttpClient, String projectKey, String ID, File file) -
Method Summary
Modifier and TypeMethodDescription<TValue> ByProjectKeyProductsByIDImagesPostaddFilename(Collection<TValue> filename) add additional filename query parametersadd additional filename query parameteraddFilename(Supplier<String> supplier) add additional filename query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddFilename(TValue filename) add additional filename query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddSku(Collection<TValue> sku) add additional sku query parametersadd additional sku query parameteradd additional sku query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddSku(TValue sku) add additional sku query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddStaged(Collection<TValue> staged) add additional staged query parametersadd additional staged query parameteradd additional staged query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddStaged(TValue staged) add additional staged query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddVariant(Collection<TValue> variant) add additional variant query parametersadd additional variant query parameteraddVariant(Supplier<Long> supplier) add additional variant query parameter<TValue> ByProjectKeyProductsByIDImagesPostaddVariant(TValue variant) add additional variant query parameterbooleanexecute(ApiHttpClient client) executeBlocking(ApiHttpClient client, Duration timeout) getBody()getID()getSku()inthashCode()intcom.fasterxml.jackson.core.type.TypeReference<Product>voidvoidsetProjectKey(String projectKey) toString()<TValue> ByProjectKeyProductsByIDImagesPostwithFilename(Collection<TValue> filename) set filename with the specified valuesset filename with the specified valuewithFilename(Supplier<String> supplier) set filename with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithFilename(TValue filename) set filename with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithSku(Collection<TValue> sku) set sku with the specified valuesset sku with the specified valueset sku with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithSku(TValue sku) set sku with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithStaged(Collection<TValue> staged) set staged with the specified valuesset staged with the specified valuewithStaged(Supplier<Boolean> supplier) set staged with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithStaged(TValue staged) set staged with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithVariant(Collection<TValue> variant) set variant with the specified valuesset variant with the specified valuewithVariant(Supplier<Long> supplier) set variant with the specified value<TValue> ByProjectKeyProductsByIDImagesPostwithVariant(TValue variant) set variant 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
-
ByProjectKeyProductsByIDImagesPost
public ByProjectKeyProductsByIDImagesPost(ApiHttpClient apiHttpClient, String projectKey, String ID, File file) -
ByProjectKeyProductsByIDImagesPost
-
-
Method Details
-
resultType
-
executeBlocking
- Specified by:
executeBlockingin interfaceClientRequestCommand<Product>- Specified by:
executeBlockingin classApiMethod<ByProjectKeyProductsByIDImagesPost,Product>
-
execute
- Specified by:
executein interfaceClientRequestCommand<Product>- Specified by:
executein classApiMethod<ByProjectKeyProductsByIDImagesPost,Product>
-
getProjectKey
-
getID
-
getFilename
-
getVariant
-
getSku
-
getStaged
-
setProjectKey
-
setID
-
withFilename
set filename with the specified value- Type Parameters:
TValue- value type- Parameters:
filename- value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addFilename
add additional filename query parameter- Type Parameters:
TValue- value type- Parameters:
filename- value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withFilename
set filename with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addFilename
add additional filename query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withFilename
set filename with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addFilename
add additional filename query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withFilename
set filename with the specified values- Type Parameters:
TValue- value type- Parameters:
filename- values to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addFilename
add additional filename query parameters- Type Parameters:
TValue- value type- Parameters:
filename- values to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withVariant
set variant with the specified value- Type Parameters:
TValue- value type- Parameters:
variant- value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addVariant
add additional variant query parameter- Type Parameters:
TValue- value type- Parameters:
variant- value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withVariant
set variant with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addVariant
add additional variant query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withVariant
set variant with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addVariant
add additional variant query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withVariant
set variant with the specified values- Type Parameters:
TValue- value type- Parameters:
variant- values to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addVariant
add additional variant query parameters- Type Parameters:
TValue- value type- Parameters:
variant- values to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withSku
set sku with the specified value- Type Parameters:
TValue- value type- Parameters:
sku- value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addSku
add additional sku query parameter- Type Parameters:
TValue- value type- Parameters:
sku- value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withSku
set sku with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addSku
add additional sku query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withSku
set sku with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addSku
add additional sku query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withSku
set sku with the specified values- Type Parameters:
TValue- value type- Parameters:
sku- values to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addSku
add additional sku query parameters- Type Parameters:
TValue- value type- Parameters:
sku- values to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withStaged
set staged with the specified value- Type Parameters:
TValue- value type- Parameters:
staged- value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addStaged
add additional staged query parameter- Type Parameters:
TValue- value type- Parameters:
staged- value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withStaged
set staged with the specified value- Parameters:
supplier- supplier for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addStaged
add additional staged query parameter- Parameters:
supplier- supplier for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withStaged
set staged with the specified value- Parameters:
op- builder for the value to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addStaged
add additional staged query parameter- Parameters:
op- builder for the value to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
withStaged
set staged with the specified values- Type Parameters:
TValue- value type- Parameters:
staged- values to be set- Returns:
- ByProjectKeyProductsByIDImagesPost
-
addStaged
add additional staged query parameters- Type Parameters:
TValue- value type- Parameters:
staged- values to be added- Returns:
- ByProjectKeyProductsByIDImagesPost
-
getBody
- Overrides:
getBodyin classTypeBodyApiMethod<ByProjectKeyProductsByIDImagesPost,Product, File>
-
withBody
- Overrides:
withBodyin classTypeBodyApiMethod<ByProjectKeyProductsByIDImagesPost,Product, File>
-
equals
-
hashCode
public int hashCode() -
toString
-
reflectionHashCode
public int reflectionHashCode()
-