Class CustomFieldsDraftBuilder
java.lang.Object
com.commercetools.api.models.type.CustomFieldsDraftBuilder
- All Implemented Interfaces:
Builder<CustomFieldsDraft>
CustomFieldsDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomFieldsDraft customFieldsDraft = CustomFieldsDraft.builder()
.type(typeBuilder -> typeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomFieldsDraft with checking for non-null required valuesbuilds CustomFieldsDraft without checking for non-null required valuesfields
(FieldContainer fields) Object containing the Custom Fields for the customized resource or data type.Object containing the Custom Fields for the customized resource or data type.Object containing the Custom Fields for the customized resource or data type.getType()
id
orkey
of the Type.static CustomFieldsDraftBuilder
of()
factory method for an instance of CustomFieldsDraftBuilderstatic CustomFieldsDraftBuilder
of
(CustomFieldsDraft template) create builder for CustomFieldsDraft instancetype
(TypeResourceIdentifier type) id
orkey
of the Type.id
orkey
of the Type.Object containing the Custom Fields for the customized resource or data type.id
orkey
of the Type.
-
Constructor Details
-
CustomFieldsDraftBuilder
public CustomFieldsDraftBuilder()
-
-
Method Details
-
type
public CustomFieldsDraftBuilder type(Function<TypeResourceIdentifierBuilder, TypeResourceIdentifierBuilder> builder) id
orkey
of the Type.- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
withType
public CustomFieldsDraftBuilder withType(Function<TypeResourceIdentifierBuilder, TypeResourceIdentifier> builder) id
orkey
of the Type.- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
type
id
orkey
of the Type.- Parameters:
type
- value to be set- Returns:
- Builder
-
fields
public CustomFieldsDraftBuilder fields(Function<FieldContainerBuilder, FieldContainerBuilder> builder) Object containing the Custom Fields for the customized resource or data type.
- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
withFields
Object containing the Custom Fields for the customized resource or data type.
- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
fields
Object containing the Custom Fields for the customized resource or data type.
- Parameters:
fields
- value to be set- Returns:
- Builder
-
getType
id
orkey
of the Type.- Returns:
- type
-
getFields
Object containing the Custom Fields for the customized resource or data type.
- Returns:
- fields
-
build
builds CustomFieldsDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomFieldsDraft>
- Returns:
- CustomFieldsDraft
-
buildUnchecked
builds CustomFieldsDraft without checking for non-null required values- Returns:
- CustomFieldsDraft
-
of
factory method for an instance of CustomFieldsDraftBuilder- Returns:
- builder
-
of
create builder for CustomFieldsDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-