Class ZoneBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<Zone>
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.build()
builds Zone with checking for non-null required valuesbuilds Zone without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Zone was initially created.Present on resources created after 1 February 2019 except for events not tracked.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.description
(String description) Description of the Zone.Date and time (UTC) the Zone was initially created.Present on resources created after 1 February 2019 except for events not tracked.Description of the Zone.getId()
Unique identifier of the Zone.getKey()
User-defined unique identifier of the Zone.Date and time (UTC) the Zone was last updated.Present on resources created after 1 February 2019 except for events not tracked.List of locations that belong to the Zone.getName()
Name of the Zone.Current version of the Zone.Unique identifier of the Zone.User-defined unique identifier of the Zone.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Zone was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.List of locations that belong to the Zone.List of locations that belong to the Zone.Name of the Zone.static ZoneBuilder
of()
factory method for an instance of ZoneBuilderstatic ZoneBuilder
create builder for Zone instanceplusLocations
(Location... locations) List of locations that belong to the Zone.plusLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.setLocations
(Function<LocationBuilder, Location> builder) List of locations that belong to the Zone.Current version of the Zone.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.withLocations
(Function<LocationBuilder, LocationBuilder> builder) List of locations that belong to the Zone.
-
Constructor Details
-
ZoneBuilder
public ZoneBuilder()
-
-
Method Details
-
id
Unique identifier of the Zone.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Zone.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Zone was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Zone was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Zone.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Zone.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the Zone.
- Parameters:
description
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
locations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
locations
- value to be set- Returns:
- Builder
-
plusLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
withLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
addLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
setLocations
List of locations that belong to the Zone.
- Parameters:
builder
- function to build the locations value- Returns:
- Builder
-
getId
Unique identifier of the Zone.
- Returns:
- id
-
getVersion
Current version of the Zone.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Zone was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Zone was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Zone.
- Returns:
- key
-
getName
Name of the Zone.
- Returns:
- name
-
getDescription
Description of the Zone.
- Returns:
- description
-
getLocations
List of locations that belong to the Zone.
- Returns:
- locations
-
build
builds Zone with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<Zone>
- Returns:
- Zone
-
buildUnchecked
builds Zone without checking for non-null required values- Returns:
- Zone
-
of
factory method for an instance of ZoneBuilder- Returns:
- builder
-
of
create builder for Zone instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-