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 ZoneBuilder
builder()
builder factory method for Zonestatic ZoneBuilder
create builder for Zone instancestatic Zone
factory method to create a deep copy of Zone@NotNull ZonedDateTime
Date and time (UTC) the Zone was initially created.@Valid CreatedBy
IDs and references that created the Zone.Description of the Zone.@NotNull String
getId()
Unique identifier of the Zone.getKey()
User-defined unique identifier of the Zone.@NotNull ZonedDateTime
Date and time (UTC) the Zone was last updated.@Valid LastModifiedBy
IDs and references that last modified the Zone.List of locations that belong to the Zone.@NotNull String
getName()
Name of the Zone.@NotNull Long
Current version of the Zone.static Zone
of()
factory methodstatic Zone
factory method to create a shallow copy Zonestatic ReferenceTypeId
void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Zone was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Zone.void
setDescription
(String description) Description of the Zone.void
Unique identifier of the Zone.void
User-defined unique identifier of the Zone.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Zone was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Zone.void
setLocations
(Location... locations) List of locations that belong to the Zone.void
setLocations
(List<Location> locations) List of locations that belong to the Zone.void
Name of the Zone.void
setVersion
(Long version) Current version of the Zone.static com.fasterxml.jackson.core.type.TypeReference<Zone>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods 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.zone.ZoneMixin
contains, toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Zone.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Zone>
- Specified by:
getId
in interfaceIdentifiable<Zone>
- Specified by:
getId
in interfaceVersioned<Zone>
- Returns:
- id
-
getVersion
Current version of the Zone.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Zone>
- Specified by:
getVersion
in interfaceVersioned<Zone>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Zone was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Specified by:
getLastModifiedAt
in 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:
getLocations
in interfaceZoneMixin
- Returns:
- locations
-
setId
Unique identifier of the Zone.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Zone.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the Zone was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Specified by:
setLastModifiedAt
in 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
-
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
-