Interface ProductType
- All Superinterfaces:
AttributeDefinitionContainer
,BaseResource
,DomainResource<ProductType>
,Identifiable<ProductType>
,ProductTypeMixin
,Referencable<ProductType>
,ResourceIdentifiable<ProductType>
,Versioned<ProductType>
,WithKey
Example to create an instance using the builder pattern
ProductType productType = ProductType.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name("{name}")
.description("{description}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductTypeBuilder
builder()
builder factory method for ProductTypestatic ProductTypeBuilder
builder
(ProductType template) create builder for ProductType instancestatic ProductType
deepCopy
(ProductType template) factory method to create a deep copy of ProductType@Valid List<AttributeDefinition>
Attributes specified for the ProductType.@NotNull ZonedDateTime
Date and time (UTC) the ProductType was initially created.@Valid CreatedBy
IDs and references that created the ProductType.@NotNull String
Description of the ProductType.@NotNull String
getId()
Unique identifier of the ProductType.getKey()
User-defined unique identifier of the ProductType.@NotNull ZonedDateTime
Date and time (UTC) the ProductType was last updated.@Valid LastModifiedBy
IDs and references that last modified the ProductType.@NotNull String
getName()
Name of the ProductType.@NotNull Long
Current version of the ProductType.static ProductType
of()
factory methodstatic ProductType
of
(ProductType template) factory method to create a shallow copy ProductTypestatic ReferenceTypeId
void
setAttributes
(AttributeDefinition... attributes) Attributes specified for the ProductType.void
setAttributes
(List<AttributeDefinition> attributes) Attributes specified for the ProductType.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ProductType was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the ProductType.void
setDescription
(String description) Description of the ProductType.void
Unique identifier of the ProductType.void
User-defined unique identifier of the ProductType.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductType was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ProductType.void
Name of the ProductType.void
setVersion
(Long version) Current version of the ProductType.static com.fasterxml.jackson.core.type.TypeReference<ProductType>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductType
(Function<ProductType, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_type.AttributeDefinitionContainer
findAttribute, getAttribute
Methods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.product_type.ProductTypeMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ProductType.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<ProductType>
- Specified by:
getId
in interfaceIdentifiable<ProductType>
- Specified by:
getId
in interfaceVersioned<ProductType>
- Returns:
- id
-
getVersion
Current version of the ProductType.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<ProductType>
- Specified by:
getVersion
in interfaceVersioned<ProductType>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductType was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductType was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ProductType.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the ProductType.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the ProductType.
-
getName
Name of the ProductType.
- Returns:
- name
-
getDescription
Description of the ProductType.
- Returns:
- description
-
getAttributes
Attributes specified for the ProductType.
- Specified by:
getAttributes
in interfaceAttributeDefinitionContainer
- Returns:
- attributes
-
setId
Unique identifier of the ProductType.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the ProductType.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the ProductType was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the ProductType was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the ProductType.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the ProductType.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier of the ProductType.
- Parameters:
key
- value to be set
-
setName
Name of the ProductType.
- Parameters:
name
- value to be set
-
setDescription
Description of the ProductType.
- Parameters:
description
- value to be set
-
setAttributes
Attributes specified for the ProductType.
- Parameters:
attributes
- values to be set
-
setAttributes
Attributes specified for the ProductType.
- Parameters:
attributes
- values to be set
-
of
factory method- Returns:
- instance of ProductType
-
of
factory method to create a shallow copy ProductType- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductType- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductType- Returns:
- builder
-
builder
create builder for ProductType instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductType
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-