Interface ProductTypeImport
- All Superinterfaces:
ImportResource
The data representation for a ProductType to be imported that is persisted as a ProductType in the Project.
Example to create an instance using the builder pattern
ProductTypeImport productTypeImport = ProductTypeImport.builder()
.key("{key}")
.name("{name}")
.description("{description}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductTypeImportBuilder
builder()
builder factory method for ProductTypeImportstatic ProductTypeImportBuilder
builder
(ProductTypeImport template) create builder for ProductTypeImport instancestatic ProductTypeImport
deepCopy
(ProductTypeImport template) factory method to create a deep copy of ProductTypeImport@Valid List<AttributeDefinition>
Theattributes
of ProductType.@NotNull String
Maps toProductType.description
.@NotNull String
getKey()
User-defined unique identifier.@NotNull String
getName()
Maps toProductType.name
.static ProductTypeImport
of()
factory methodstatic ProductTypeImport
of
(ProductTypeImport template) factory method to create a shallow copy ProductTypeImportvoid
setAttributes
(AttributeDefinition... attributes) Theattributes
of ProductType.void
setAttributes
(List<AttributeDefinition> attributes) Theattributes
of ProductType.void
setDescription
(String description) Maps toProductType.description
.void
User-defined unique identifier.void
Maps toProductType.name
.static com.fasterxml.jackson.core.type.TypeReference<ProductTypeImport>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductTypeImport
(Function<ProductTypeImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier. If a ProductType with this
key
exists, it will be updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getName
Maps to
ProductType.name
.- Returns:
- name
-
getDescription
Maps to
ProductType.description
.- Returns:
- description
-
getAttributes
The
attributes
of ProductType.- Returns:
- attributes
-
setKey
User-defined unique identifier. If a ProductType with this
key
exists, it will be updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setName
Maps to
ProductType.name
.- Parameters:
name
- value to be set
-
setDescription
Maps to
ProductType.description
.- Parameters:
description
- value to be set
-
setAttributes
The
attributes
of ProductType.- Parameters:
attributes
- values to be set
-
setAttributes
The
attributes
of ProductType.- Parameters:
attributes
- values to be set
-
of
factory method- Returns:
- instance of ProductTypeImport
-
of
factory method to create a shallow copy ProductTypeImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductTypeImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTypeImport- Returns:
- builder
-
builder
create builder for ProductTypeImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductTypeImport
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-