Class ZoneDraftBuilder
java.lang.Object
com.commercetools.api.models.zone.ZoneDraftBuilder
ZoneDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ZoneDraft zoneDraft = ZoneDraft.builder()
.name("{name}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.build()
builds ZoneDraft with checking for non-null required valuesbuilds ZoneDraft without checking for non-null required valuesdescription
(String description) Description of the Zone.Description of the Zone.getKey()
User-defined unique identifier for the Zone.List of locations that belong to the Zone.getName()
Name of the Zone.User-defined unique identifier for the Zone.List of locations that belong to the Zone.List of locations that belong to the Zone.Name of the Zone.static ZoneDraftBuilder
of()
factory method for an instance of ZoneDraftBuilderstatic ZoneDraftBuilder
create builder for ZoneDraft instanceplusLocations
(Location... locations) List of locations that belong to the Zone.plusLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.setLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.withLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.
-
Constructor Details
-
ZoneDraftBuilder
public ZoneDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the Zone.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Zone.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the Zone.
- Parameters:
description
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
withLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
addLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
setLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
getKey
User-defined unique identifier for the Zone.
- Returns:
- key
-
getName
Name of the Zone.
- Returns:
- name
-
getDescription
Description of the Zone.
- Returns:
- description
-
getLocations
List of locations that belong to the Zone.
- Returns:
- locations
-
build
builds ZoneDraft with checking for non-null required values -
buildUnchecked
builds ZoneDraft without checking for non-null required values- Returns:
- ZoneDraft
-
of
factory method for an instance of ZoneDraftBuilder- Returns:
- builder
-
of
create builder for ZoneDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-