Class ExtensionInputBuilder
java.lang.Object
com.commercetools.api.models.extension.ExtensionInputBuilder
- All Implemented Interfaces:
Builder<ExtensionInput>
ExtensionInputBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ExtensionInput extensionInput = ExtensionInput.builder()
.action(ExtensionAction.CREATE)
.resource(resourceBuilder -> resourceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction
(ExtensionAction action) Create
orUpdate
request.build()
builds ExtensionInput with checking for non-null required valuesbuilds ExtensionInput without checking for non-null required valuesCreate
orUpdate
request.Expanded reference to the resource that triggered the Extension.static ExtensionInputBuilder
of()
factory method for an instance of ExtensionInputBuilderstatic ExtensionInputBuilder
of
(ExtensionInput template) create builder for ExtensionInput instanceExpanded reference to the resource that triggered the Extension.resource
(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Expanded reference to the resource that triggered the Extension.
-
Constructor Details
-
ExtensionInputBuilder
public ExtensionInputBuilder()
-
-
Method Details
-
action
Create
orUpdate
request.- Parameters:
action
- value to be set- Returns:
- Builder
-
resource
Expanded reference to the resource that triggered the Extension.
- Parameters:
resource
- value to be set- Returns:
- Builder
-
resource
public ExtensionInputBuilder resource(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Expanded reference to the resource that triggered the Extension.
- Parameters:
builder
- function to build the resource value- Returns:
- Builder
-
getAction
Create
orUpdate
request.- Returns:
- action
-
getResource
Expanded reference to the resource that triggered the Extension.
- Returns:
- resource
-
build
builds ExtensionInput with checking for non-null required values- Specified by:
build
in interfaceBuilder<ExtensionInput>
- Returns:
- ExtensionInput
-
buildUnchecked
builds ExtensionInput without checking for non-null required values- Returns:
- ExtensionInput
-
of
factory method for an instance of ExtensionInputBuilder- Returns:
- builder
-
of
create builder for ExtensionInput instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-