Class AssetSourceBuilder
java.lang.Object
com.commercetools.importapi.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}")
.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) The width and height of the Asset Source.The width and height of the Asset Source.value of contentType}The width and height of the Asset Source.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 uriThe width and height of the Asset Source.
-
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) The width and height of the Asset Source.
- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
withDimensions
The width and height of the Asset Source.
- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
dimensions
The width and height of the Asset Source.
- 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
The width and height of the Asset Source.
- 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
-