Class SimilarProductsTaskStatusBuilder
- All Implemented Interfaces:
Builder<SimilarProductsTaskStatus>
Example to create an instance using the builder pattern
SimilarProductsTaskStatus similarProductsTaskStatus = SimilarProductsTaskStatus.builder()
.state(TaskStatusEnum.PENDING)
.result(resultBuilder -> resultBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds SimilarProductsTaskStatus with checking for non-null required valuesbuilds SimilarProductsTaskStatus without checking for non-null required valuesexpires
(ZonedDateTime expires) The expiry date of the result.The expiry date of the result.The response to an asynchronous request.getState()
value of state}of()
factory method for an instance of SimilarProductsTaskStatusBuilderof
(SimilarProductsTaskStatus template) create builder for SimilarProductsTaskStatus instanceThe response to an asynchronous request.result
(Function<SimilarProductsPagedQueryResultBuilder, SimilarProductsPagedQueryResultBuilder> builder) The response to an asynchronous request.state
(TaskStatusEnum state) set the value to the statewithResult
(Function<SimilarProductsPagedQueryResultBuilder, SimilarProductsPagedQueryResult> builder) The response to an asynchronous request.
-
Constructor Details
-
SimilarProductsTaskStatusBuilder
public SimilarProductsTaskStatusBuilder()
-
-
Method Details
-
state
set the value to the state- Parameters:
state
- value to be set- Returns:
- Builder
-
expires
The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.
- Parameters:
expires
- value to be set- Returns:
- Builder
-
result
public SimilarProductsTaskStatusBuilder result(Function<SimilarProductsPagedQueryResultBuilder, SimilarProductsPagedQueryResultBuilder> builder) The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is
SUCCESS
.- Parameters:
builder
- function to build the result value- Returns:
- Builder
-
withResult
public SimilarProductsTaskStatusBuilder withResult(Function<SimilarProductsPagedQueryResultBuilder, SimilarProductsPagedQueryResult> builder) The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is
SUCCESS
.- Parameters:
builder
- function to build the result value- Returns:
- Builder
-
result
The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is
SUCCESS
.- Parameters:
result
- value to be set- Returns:
- Builder
-
getState
value of state}- Returns:
- state
-
getExpires
The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.
- Returns:
- expires
-
getResult
The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is
SUCCESS
.- Returns:
- result
-
build
builds SimilarProductsTaskStatus with checking for non-null required values- Specified by:
build
in interfaceBuilder<SimilarProductsTaskStatus>
- Returns:
- SimilarProductsTaskStatus
-
buildUnchecked
builds SimilarProductsTaskStatus without checking for non-null required values- Returns:
- SimilarProductsTaskStatus
-
of
factory method for an instance of SimilarProductsTaskStatusBuilder- Returns:
- builder
-
of
create builder for SimilarProductsTaskStatus instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-