Interface Zone
- All Superinterfaces:
BaseResource,DomainResource<Zone>,Identifiable<Zone>,Referencable<Zone>,ResourceIdentifiable<Zone>,Versioned<Zone>,WithKey,ZoneMixin
Example to create an instance using the builder pattern
Zone zone = Zone.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}")
.plusLocations(locationsBuilder -> locationsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ZoneBuilderbuilder()builder factory method for Zonestatic ZoneBuildercreate builder for Zone instancecopyDeep()static Zonefactory method to create a deep copy of Zone@NotNull ZonedDateTimeDate and time (UTC) the Zone was initially created.@Valid CreatedByIDs and references that created the Zone.Description of the Zone.@NotNull StringgetId()Unique identifier of the Zone.getKey()User-defined unique identifier of the Zone.@NotNull ZonedDateTimeDate and time (UTC) the Zone was last updated.@Valid LastModifiedByIDs and references that last modified the Zone.List of locations that belong to the Zone.@NotNull StringgetName()Name of the Zone.@NotNull LongCurrent version of the Zone.static Zoneof()factory methodstatic Zonefactory method to create a shallow copy Zonestatic ReferenceTypeIdvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Zone was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Zone.voidsetDescription(String description) Description of the Zone.voidUnique identifier of the Zone.voidUser-defined unique identifier of the Zone.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Zone was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Zone.voidsetLocations(Location... locations) List of locations that belong to the Zone.voidsetLocations(List<Location> locations) List of locations that belong to the Zone.voidName of the Zone.voidsetVersion(Long version) Current version of the Zone.static com.fasterxml.jackson.core.type.TypeReference<Zone>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.zone.ZoneMixin
contains, toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Zone.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Zone>- Specified by:
getIdin interfaceIdentifiable<Zone>- Specified by:
getIdin interfaceVersioned<Zone>- Returns:
- id
-
getVersion
Current version of the Zone.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Zone>- Specified by:
getVersionin interfaceVersioned<Zone>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Zone was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Zone.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Zone.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the Zone.
-
getName
Name of the Zone.
- Returns:
- name
-
getDescription
String getDescription()Description of the Zone.
- Returns:
- description
-
getLocations
List of locations that belong to the Zone.
- Specified by:
getLocationsin interfaceZoneMixin- Returns:
- locations
-
setId
Unique identifier of the Zone.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Zone.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Zone was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Zone.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Zone.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the Zone.
- Parameters:
key- value to be set
-
setName
Name of the Zone.
- Parameters:
name- value to be set
-
setDescription
Description of the Zone.
- Parameters:
description- value to be set
-
setLocations
List of locations that belong to the Zone.
- Parameters:
locations- values to be set
-
setLocations
List of locations that belong to the Zone.
- Parameters:
locations- values to be set
-
of
factory method- Returns:
- instance of Zone
-
of
factory method to create a shallow copy Zone- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Zone copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Zone- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Zone- Returns:
- builder
-
builder
create builder for Zone instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withZone
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
-