Class CustomFieldsBuilder
java.lang.Object
com.commercetools.api.models.type.CustomFieldsBuilder
- All Implemented Interfaces:
Builder<CustomFields>
CustomFieldsBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomFields customFields = CustomFields.builder()
.type(typeBuilder -> typeBuilder)
.fields(fieldsBuilder -> fieldsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomFields with checking for non-null required valuesbuilds CustomFields 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()
Reference to the Type that holds the FieldDefinitions for the Custom Fields.static CustomFieldsBuilder
of()
factory method for an instance of CustomFieldsBuilderstatic CustomFieldsBuilder
of
(CustomFields template) create builder for CustomFields instancetype
(TypeReference type) Reference to the Type that holds the FieldDefinitions for the Custom Fields.type
(Function<TypeReferenceBuilder, TypeReferenceBuilder> builder) Reference to the Type that holds the FieldDefinitions for the Custom Fields.Object containing the Custom Fields for the customized resource or data type.withType
(Function<TypeReferenceBuilder, TypeReference> builder) Reference to the Type that holds the FieldDefinitions for the Custom Fields.
-
Constructor Details
-
CustomFieldsBuilder
public CustomFieldsBuilder()
-
-
Method Details
-
type
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
withType
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Parameters:
builder
- function to build the type value- Returns:
- Builder
-
type
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Parameters:
type
- value to be set- Returns:
- Builder
-
fields
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
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Returns:
- type
-
getFields
Object containing the Custom Fields for the customized resource or data type.
- Returns:
- fields
-
build
builds CustomFields with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomFields>
- Returns:
- CustomFields
-
buildUnchecked
builds CustomFields without checking for non-null required values- Returns:
- CustomFields
-
of
factory method for an instance of CustomFieldsBuilder- Returns:
- builder
-
of
create builder for CustomFields instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-