Class ParcelMeasurementDraftBuilder
java.lang.Object
com.commercetools.importapi.models.order_patches.ParcelMeasurementDraftBuilder
- All Implemented Interfaces:
Builder<ParcelMeasurementDraft>
public class ParcelMeasurementDraftBuilder
extends Object
implements Builder<ParcelMeasurementDraft>
ParcelMeasurementDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ParcelMeasurementDraft parcelMeasurementDraft = ParcelMeasurementDraft.builder()
.parcelId("{parcelId}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ParcelMeasurementDraft with checking for non-null required valuesbuilds ParcelMeasurementDraft without checking for non-null required valuesvalue of measurements}value of parcelId}measurements
(ParcelMeasurements measurements) set the value to the measurementsset the value to the measurements using the builder functionof()
factory method for an instance of ParcelMeasurementDraftBuilderof
(ParcelMeasurementDraft template) create builder for ParcelMeasurementDraft instanceset the value to the parcelIdset the value to the measurements using the builder function
-
Constructor Details
-
ParcelMeasurementDraftBuilder
public ParcelMeasurementDraftBuilder()
-
-
Method Details
-
parcelId
set the value to the parcelId- Parameters:
parcelId
- value to be set- Returns:
- Builder
-
measurements
public ParcelMeasurementDraftBuilder measurements(Function<ParcelMeasurementsBuilder, ParcelMeasurementsBuilder> builder) set the value to the measurements using the builder function- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
withMeasurements
public ParcelMeasurementDraftBuilder withMeasurements(Function<ParcelMeasurementsBuilder, ParcelMeasurements> builder) set the value to the measurements using the builder function- Parameters:
builder
- function to build the measurements value- Returns:
- Builder
-
measurements
set the value to the measurements- Parameters:
measurements
- value to be set- Returns:
- Builder
-
getParcelId
value of parcelId}- Returns:
- parcelId
-
getMeasurements
value of measurements}- Returns:
- measurements
-
build
builds ParcelMeasurementDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ParcelMeasurementDraft>
- Returns:
- ParcelMeasurementDraft
-
buildUnchecked
builds ParcelMeasurementDraft without checking for non-null required values- Returns:
- ParcelMeasurementDraft
-
of
factory method for an instance of ParcelMeasurementDraftBuilder- Returns:
- builder
-
of
create builder for ParcelMeasurementDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-