Class ChannelBuilder
Example to create an instance using the builder pattern
Channel channel = Channel.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}")
.plusRoles(rolesBuilder -> rolesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAddress where the Channel is located (for example, if the Channel is a physical store).address
(Function<AddressBuilder, AddressBuilder> builder) Address where the Channel is located (for example, if the Channel is a physical store).build()
builds Channel with checking for non-null required valuesbuilds Channel without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Channel was initially created.IDs and references that created the Channel.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Channel.custom
(CustomFields custom) Custom Fields defined for the Channel.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields defined for the Channel.description
(LocalizedString description) Description of the Channel.Description of the Channel.geoLocation
(GeoJson geoLocation) GeoJSON geometry object encoding the geo location of the Channel.geoLocation
(Function<GeoJsonBuilder, Builder<? extends GeoJson>> builder) GeoJSON geometry object encoding the geo location of the Channel.Address where the Channel is located (for example, if the Channel is a physical store).Date and time (UTC) the Channel was initially created.IDs and references that created the Channel.Custom Fields defined for the Channel.Description of the Channel.GeoJSON geometry object encoding the geo location of the Channel.getId()
Unique identifier of the Channel.getKey()
User-defined unique identifier of the Channel.Date and time (UTC) the Channel was last updated.IDs and references that last modified the Channel.getName()
Name of the Channel.Statistics about the review ratings taken into account for the Channel.getRoles()
Roles of the Channel.Current version of the Channel.Unique identifier of the Channel.User-defined unique identifier of the Channel.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Channel was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Channel.IDs and references that last modified the Channel.name
(LocalizedString name) Name of the Channel.Name of the Channel.static ChannelBuilder
of()
factory method for an instance of ChannelBuilderstatic ChannelBuilder
create builder for Channel instanceplusRoles
(ChannelRoleEnum... roles) Roles of the Channel.reviewRatingStatistics
(ReviewRatingStatistics reviewRatingStatistics) Statistics about the review ratings taken into account for the Channel.reviewRatingStatistics
(Function<ReviewRatingStatisticsBuilder, ReviewRatingStatisticsBuilder> builder) Statistics about the review ratings taken into account for the Channel.roles
(ChannelRoleEnum... roles) Roles of the Channel.roles
(List<ChannelRoleEnum> roles) Roles of the Channel.Current version of the Channel.withAddress
(Function<AddressBuilder, Address> builder) Address where the Channel is located (for example, if the Channel is a physical store).withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Channel.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields defined for the Channel.Description of the Channel.IDs and references that last modified the Channel.Name of the Channel.Statistics about the review ratings taken into account for the Channel.
-
Constructor Details
-
ChannelBuilder
public ChannelBuilder()
-
-
Method Details
-
id
Unique identifier of the Channel.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Channel.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Channel was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Channel was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Channel.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Channel.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Channel.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Channel.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Channel.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Channel.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Channel.
- Parameters:
key
- value to be set- Returns:
- Builder
-
roles
Roles of the Channel.
- Parameters:
roles
- value to be set- Returns:
- Builder
-
roles
Roles of the Channel.
- Parameters:
roles
- value to be set- Returns:
- Builder
-
plusRoles
Roles of the Channel.
- Parameters:
roles
- value to be set- Returns:
- Builder
-
name
Name of the Channel.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the Channel.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Channel.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the Channel.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
Description of the Channel.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the Channel.
- Parameters:
description
- value to be set- Returns:
- Builder
-
address
Address where the Channel is located (for example, if the Channel is a physical store).
- Parameters:
builder
- function to build the address value- Returns:
- Builder
-
withAddress
Address where the Channel is located (for example, if the Channel is a physical store).
- Parameters:
builder
- function to build the address value- Returns:
- Builder
-
address
Address where the Channel is located (for example, if the Channel is a physical store).
- Parameters:
address
- value to be set- Returns:
- Builder
-
reviewRatingStatistics
public ChannelBuilder reviewRatingStatistics(Function<ReviewRatingStatisticsBuilder, ReviewRatingStatisticsBuilder> builder) Statistics about the review ratings taken into account for the Channel.
- Parameters:
builder
- function to build the reviewRatingStatistics value- Returns:
- Builder
-
withReviewRatingStatistics
public ChannelBuilder withReviewRatingStatistics(Function<ReviewRatingStatisticsBuilder, ReviewRatingStatistics> builder) Statistics about the review ratings taken into account for the Channel.
- Parameters:
builder
- function to build the reviewRatingStatistics value- Returns:
- Builder
-
reviewRatingStatistics
public ChannelBuilder reviewRatingStatistics(@Nullable ReviewRatingStatistics reviewRatingStatistics) Statistics about the review ratings taken into account for the Channel.
- Parameters:
reviewRatingStatistics
- value to be set- Returns:
- Builder
-
custom
Custom Fields defined for the Channel.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields defined for the Channel.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields defined for the Channel.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
geoLocation
GeoJSON geometry object encoding the geo location of the Channel.
- Parameters:
geoLocation
- value to be set- Returns:
- Builder
-
geoLocation
GeoJSON geometry object encoding the geo location of the Channel.
- Parameters:
builder
- function to build the geoLocation value- Returns:
- Builder
-
getId
Unique identifier of the Channel.
- Returns:
- id
-
getVersion
Current version of the Channel.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Channel was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Channel was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Channel.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Channel.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Channel.
- Returns:
- key
-
getRoles
Roles of the Channel.
- Returns:
- roles
-
getName
Name of the Channel.
- Returns:
- name
-
getDescription
Description of the Channel.
- Returns:
- description
-
getAddress
Address where the Channel is located (for example, if the Channel is a physical store).
- Returns:
- address
-
getReviewRatingStatistics
Statistics about the review ratings taken into account for the Channel.
- Returns:
- reviewRatingStatistics
-
getCustom
Custom Fields defined for the Channel.
- Returns:
- custom
-
getGeoLocation
GeoJSON geometry object encoding the geo location of the Channel.
- Returns:
- geoLocation
-
build
builds Channel with checking for non-null required values -
buildUnchecked
builds Channel without checking for non-null required values- Returns:
- Channel
-
of
factory method for an instance of ChannelBuilder- Returns:
- builder
-
of
create builder for Channel instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-