Class AssetSourceBuilder
java.lang.Object
com.commercetools.history.models.common.AssetSourceBuilder
- All Implemented Interfaces:
Builder<AssetSource>
AssetSourceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssetSource assetSource = AssetSource.builder()
.uri("{uri}")
.key("{key}")
.dimensions(dimensionsBuilder -> dimensionsBuilder)
.contentType("{contentType}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AssetSource with checking for non-null required valuesbuilds AssetSource without checking for non-null required valuescontentType
(String contentType) set the value to the contentTypedimensions
(AssetDimensions dimensions) set the value to the dimensionsset the value to the dimensions using the builder functionvalue of contentType}value of dimensions}getKey()
value of key}getUri()
value of uri}set the value to the keystatic AssetSourceBuilder
of()
factory method for an instance of AssetSourceBuilderstatic AssetSourceBuilder
of
(AssetSource template) create builder for AssetSource instanceset the value to the uriset the value to the dimensions using the builder function
-
Constructor Details
-
AssetSourceBuilder
public AssetSourceBuilder()
-
-
Method Details
-
uri
set the value to the uri- Parameters:
uri
- value to be set- Returns:
- Builder
-
key
set the value to the key- Parameters:
key
- value to be set- Returns:
- Builder
-
dimensions
public AssetSourceBuilder dimensions(Function<AssetDimensionsBuilder, AssetDimensionsBuilder> builder) set the value to the dimensions using the builder function- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
withDimensions
set the value to the dimensions using the builder function- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
dimensions
set the value to the dimensions- Parameters:
dimensions
- value to be set- Returns:
- Builder
-
contentType
set the value to the contentType- Parameters:
contentType
- value to be set- Returns:
- Builder
-
getUri
value of uri}- Returns:
- uri
-
getKey
value of key}- Returns:
- key
-
getDimensions
value of dimensions}- Returns:
- dimensions
-
getContentType
value of contentType}- Returns:
- contentType
-
build
builds AssetSource with checking for non-null required values- Specified by:
build
in interfaceBuilder<AssetSource>
- Returns:
- AssetSource
-
buildUnchecked
builds AssetSource without checking for non-null required values- Returns:
- AssetSource
-
of
factory method for an instance of AssetSourceBuilder- Returns:
- builder
-
of
create builder for AssetSource instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-