Interface Type
- All Superinterfaces:
BaseResource,DomainResource<Type>,Identifiable<Type>,Referencable<Type>,ResourceIdentifiable<Type>,TypeMixin,Versioned<Type>,WithKey
Example to create an instance using the builder pattern
Type type = Type.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.name(nameBuilder -> nameBuilder)
.plusResourceTypeIds(resourceTypeIdsBuilder -> resourceTypeIdsBuilder)
.plusFieldDefinitions(fieldDefinitionsBuilder -> fieldDefinitionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeBuilderbuilder()builder factory method for Typestatic TypeBuildercreate builder for Type instancecopyDeep()static Typefactory method to create a deep copy of Type@NotNull ZonedDateTimeDate and time (UTC) the Type was initially created.@Valid CreatedByIDs and references that created the Type.@Valid LocalizedStringDescription of the Type.@NotNull @Valid List<FieldDefinition>Defines Custom Fields.@NotNull StringgetId()Unique identifier of the Type.@NotNull StringgetKey()User-defined unique identifier of the Type.@NotNull ZonedDateTimeDate and time (UTC) the Type was last updated.@Valid LastModifiedByIDs and references that last modified the Type.@NotNull @Valid LocalizedStringgetName()Name of the Type.@NotNull List<ResourceTypeId>Resources and/or data types for which the Type is defined.@NotNull LongCurrent version of the Type.static Typeof()factory methodstatic Typefactory method to create a shallow copy Typestatic ReferenceTypeIdvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Type was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Type.voidsetDescription(LocalizedString description) Description of the Type.voidsetFieldDefinitions(FieldDefinition... fieldDefinitions) Defines Custom Fields.voidsetFieldDefinitions(List<FieldDefinition> fieldDefinitions) Defines Custom Fields.voidUnique identifier of the Type.voidUser-defined unique identifier of the Type.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Type was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Type.voidsetName(LocalizedString name) Name of the Type.voidsetResourceTypeIds(ResourceTypeId... resourceTypeIds) Resources and/or data types for which the Type is defined.voidsetResourceTypeIds(List<ResourceTypeId> resourceTypeIds) Resources and/or data types for which the Type is defined.voidsetVersion(Long version) Current version of the Type.static com.fasterxml.jackson.core.type.TypeReference<Type>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.type.TypeMixin
getFieldDefinitionByName, toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Type.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Type>- Specified by:
getIdin interfaceIdentifiable<Type>- Specified by:
getIdin interfaceVersioned<Type>- Returns:
- id
-
getVersion
Current version of the Type.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Type>- Specified by:
getVersionin interfaceVersioned<Type>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Type was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Type was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Type.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Type.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Type.
-
getName
Name of the Type.
- Returns:
- name
-
getDescription
Description of the Type.
- Returns:
- description
-
getResourceTypeIds
Resources and/or data types for which the Type is defined.
- Returns:
- resourceTypeIds
-
getFieldDefinitions
Defines Custom Fields.
- Specified by:
getFieldDefinitionsin interfaceTypeMixin- Returns:
- fieldDefinitions
-
setId
Unique identifier of the Type.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Type.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Type was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Type was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Type.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Type.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the Type.
- Parameters:
key- value to be set
-
setName
Name of the Type.
- Parameters:
name- value to be set
-
setDescription
Description of the Type.
- Parameters:
description- value to be set
-
setResourceTypeIds
Resources and/or data types for which the Type is defined.
- Parameters:
resourceTypeIds- values to be set
-
setResourceTypeIds
Resources and/or data types for which the Type is defined.
- Parameters:
resourceTypeIds- values to be set
-
setFieldDefinitions
Defines Custom Fields.
- Parameters:
fieldDefinitions- values to be set
-
setFieldDefinitions
Defines Custom Fields.
- Parameters:
fieldDefinitions- values to be set
-
of
factory method- Returns:
- instance of Type
-
of
factory method to create a shallow copy Type- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Type copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Type- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Type- Returns:
- builder
-
builder
create builder for Type instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withType
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
-