Class ProductTypeImportBuilder
java.lang.Object
com.commercetools.importapi.models.producttypes.ProductTypeImportBuilder
- All Implemented Interfaces:
Builder<ProductTypeImport>
ProductTypeImportBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductTypeImport productTypeImport = ProductTypeImport.builder()
.key("{key}")
.name("{name}")
.description("{description}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTheattributes
of ProductType.attributes
(AttributeDefinition... attributes) Theattributes
of ProductType.attributes
(List<AttributeDefinition> attributes) Theattributes
of ProductType.build()
builds ProductTypeImport with checking for non-null required valuesbuilds ProductTypeImport without checking for non-null required valuesdescription
(String description) Maps toProductType.description
.Theattributes
of ProductType.Maps toProductType.description
.getKey()
User-defined unique identifier.getName()
Maps toProductType.name
.User-defined unique identifier.Maps toProductType.name
.static ProductTypeImportBuilder
of()
factory method for an instance of ProductTypeImportBuilderstatic ProductTypeImportBuilder
of
(ProductTypeImport template) create builder for ProductTypeImport instanceplusAttributes
(AttributeDefinition... attributes) Theattributes
of ProductType.Theattributes
of ProductType.Theattributes
of ProductType.Theattributes
of ProductType.
-
Constructor Details
-
ProductTypeImportBuilder
public ProductTypeImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a ProductType with this
key
exists, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Maps to
ProductType.name
.- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Maps to
ProductType.description
.- Parameters:
description
- value to be set- Returns:
- Builder
-
attributes
The
attributes
of ProductType.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
The
attributes
of ProductType.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
The
attributes
of ProductType.- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public ProductTypeImportBuilder plusAttributes(Function<AttributeDefinitionBuilder, AttributeDefinitionBuilder> builder) The
attributes
of ProductType.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductTypeImportBuilder withAttributes(Function<AttributeDefinitionBuilder, AttributeDefinitionBuilder> builder) The
attributes
of ProductType.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
addAttributes
public ProductTypeImportBuilder addAttributes(Function<AttributeDefinitionBuilder, AttributeDefinition> builder) The
attributes
of ProductType.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
setAttributes
public ProductTypeImportBuilder setAttributes(Function<AttributeDefinitionBuilder, AttributeDefinition> builder) The
attributes
of ProductType.- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
getKey
User-defined unique identifier. If a ProductType with this
key
exists, it will be updated with the imported data.- Returns:
- key
-
getName
Maps to
ProductType.name
.- Returns:
- name
-
getDescription
Maps to
ProductType.description
.- Returns:
- description
-
getAttributes
The
attributes
of ProductType.- Returns:
- attributes
-
build
builds ProductTypeImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductTypeImport>
- Returns:
- ProductTypeImport
-
buildUnchecked
builds ProductTypeImport without checking for non-null required values- Returns:
- ProductTypeImport
-
of
factory method for an instance of ProductTypeImportBuilder- Returns:
- builder
-
of
create builder for ProductTypeImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-