Interface TypeImport
- All Superinterfaces:
ImportResource
Represents the data used to import a Type. Once imported, this data is persisted as a Type in the Project.
Example to create an instance using the builder pattern
TypeImport typeImport = TypeImport.builder()
.key("{key}")
.name(nameBuilder -> nameBuilder)
.plusResourceTypeIds(resourceTypeIdsBuilder -> resourceTypeIdsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeImportBuilderbuilder()builder factory method for TypeImportstatic TypeImportBuilderbuilder(TypeImport template) create builder for TypeImport instancecopyDeep()static TypeImportdeepCopy(TypeImport template) factory method to create a deep copy of TypeImport@Valid LocalizedStringMaps toType.description.@Valid List<FieldDefinition>Maps toType.fieldDefinitions.@NotNull StringgetKey()User-defined unique identifier for the Type.@NotNull @Valid LocalizedStringgetName()Maps toType.name.@NotNull List<ResourceTypeId>Maps toType.resourceTypeIds.static TypeImportof()factory methodstatic TypeImportof(TypeImport template) factory method to create a shallow copy TypeImportvoidsetDescription(LocalizedString description) Maps toType.description.voidsetFieldDefinitions(FieldDefinition... fieldDefinitions) Maps toType.fieldDefinitions.voidsetFieldDefinitions(List<FieldDefinition> fieldDefinitions) Maps toType.fieldDefinitions.voidUser-defined unique identifier for the Type.voidsetName(LocalizedString name) Maps toType.name.voidsetResourceTypeIds(ResourceTypeId... resourceTypeIds) Maps toType.resourceTypeIds.voidsetResourceTypeIds(List<ResourceTypeId> resourceTypeIds) Maps toType.resourceTypeIds.static com.fasterxml.jackson.core.type.TypeReference<TypeImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithTypeImport(Function<TypeImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier for the Type. If a Type with this
keyexists, it is updated with the imported data.- Specified by:
getKeyin interfaceImportResource- Returns:
- key
-
getName
Maps to
Type.name.- Returns:
- name
-
getDescription
Maps to
Type.description.- Returns:
- description
-
getResourceTypeIds
Maps to
Type.resourceTypeIds. This value cannot be changed after the Type is imported.- Returns:
- resourceTypeIds
-
getFieldDefinitions
Maps to
Type.fieldDefinitions.- Returns:
- fieldDefinitions
-
setKey
User-defined unique identifier for the Type. If a Type with this
keyexists, it is updated with the imported data.- Specified by:
setKeyin interfaceImportResource- Parameters:
key- value to be set
-
setName
Maps to
Type.name.- Parameters:
name- value to be set
-
setDescription
Maps to
Type.description.- Parameters:
description- value to be set
-
setResourceTypeIds
Maps to
Type.resourceTypeIds. This value cannot be changed after the Type is imported.- Parameters:
resourceTypeIds- values to be set
-
setResourceTypeIds
Maps to
Type.resourceTypeIds. This value cannot be changed after the Type is imported.- Parameters:
resourceTypeIds- values to be set
-
setFieldDefinitions
Maps to
Type.fieldDefinitions.- Parameters:
fieldDefinitions- values to be set
-
setFieldDefinitions
Maps to
Type.fieldDefinitions.- Parameters:
fieldDefinitions- values to be set
-
of
factory method- Returns:
- instance of TypeImport
-
of
factory method to create a shallow copy TypeImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
TypeImport copyDeep()- Specified by:
copyDeepin interfaceImportResource
-
deepCopy
factory method to create a deep copy of TypeImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TypeImport- Returns:
- builder
-
builder
create builder for TypeImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withTypeImport
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
-