Class RecordBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<Record>
Example to create an instance using the builder pattern
Record record = Record.builder()
.version(1)
.previousVersion(1)
.type("{type}")
.modifiedBy(modifiedByBuilder -> modifiedByBuilder)
.modifiedAt("{modifiedAt}")
.label(labelBuilder -> labelBuilder)
.previousLabel(previousLabelBuilder -> previousLabelBuilder)
.plusChanges(changesBuilder -> changesBuilder)
.resource(resourceBuilder -> resourceBuilder)
.plusStores(storesBuilder -> storesBuilder)
.withoutChanges(true)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddStores(Function<KeyReferenceBuilder, KeyReference> builder) References to the Stores associated with the Change.build()builds Record with checking for non-null required valuesbuilds Record without checking for non-null required valuesShows the differences in the resource betweenpreviousVersionandversion.Shows the differences in the resource betweenpreviousVersionandversion.Shows the differences in the resource betweenpreviousVersionandversion.getLabel()Information that describes the resource after the change.Date and time (UTC) when the change was made.Information about the user or API Client who performed the change.Information that describes the resource before the change.Version of the resource before the change.ResourceIdentifier of the changed resource.References to the Stores associated with the Change.getType()Indicates the type of change.Version of the resource after the change.trueif no change was detected.Information that describes the resource after the change.label(Function<LabelBuilder, io.vrap.rmf.base.client.Builder<? extends Label>> builder) Information that describes the resource after the change.modifiedAt(String modifiedAt) Date and time (UTC) when the change was made.modifiedBy(ModifiedBy modifiedBy) Information about the user or API Client who performed the change.modifiedBy(Function<ModifiedByBuilder, ModifiedByBuilder> builder) Information about the user or API Client who performed the change.static RecordBuilderof()factory method for an instance of RecordBuilderstatic RecordBuildercreate builder for Record instanceplusChanges(Change... changes) Shows the differences in the resource betweenpreviousVersionandversion.plusChanges(Function<ChangeBuilder, io.vrap.rmf.base.client.Builder<? extends Change>> builder) Shows the differences in the resource betweenpreviousVersionandversion.plusStores(KeyReference... stores) References to the Stores associated with the Change.References to the Stores associated with the Change.previousLabel(Label previousLabel) Information that describes the resource before the change.previousLabel(Function<LabelBuilder, io.vrap.rmf.base.client.Builder<? extends Label>> builder) Information that describes the resource before the change.previousVersion(Integer previousVersion) Version of the resource before the change.resource(ResourceIdentifier resource) ResourceIdentifier of the changed resource.ResourceIdentifier of the changed resource.setStores(Function<KeyReferenceBuilder, KeyReference> builder) References to the Stores associated with the Change.stores(KeyReference... stores) References to the Stores associated with the Change.stores(List<KeyReference> stores) References to the Stores associated with the Change.Indicates the type of change.Version of the resource after the change.withChanges(Function<ChangeBuilder, io.vrap.rmf.base.client.Builder<? extends Change>> builder) Shows the differences in the resource betweenpreviousVersionandversion.withModifiedBy(Function<ModifiedByBuilder, ModifiedBy> builder) Information about the user or API Client who performed the change.withoutChanges(Boolean withoutChanges) trueif no change was detected.ResourceIdentifier of the changed resource.References to the Stores associated with the Change.
-
Constructor Details
-
RecordBuilder
public RecordBuilder()
-
-
Method Details
-
version
Version of the resource after the change.
For more information on how the version is incremented, see Optimistic Concurrency Control.
- Parameters:
version- value to be set- Returns:
- Builder
-
previousVersion
Version of the resource before the change.
- Parameters:
previousVersion- value to be set- Returns:
- Builder
-
type
Indicates the type of change. For creation, update, or deletion, the value is
"ResourceCreated","ResourceUpdated", or"ResourceDeleted"respectively.- Parameters:
type- value to be set- Returns:
- Builder
-
modifiedBy
Information about the user or API Client who performed the change.
- Parameters:
builder- function to build the modifiedBy value- Returns:
- Builder
-
withModifiedBy
Information about the user or API Client who performed the change.
- Parameters:
builder- function to build the modifiedBy value- Returns:
- Builder
-
modifiedBy
Information about the user or API Client who performed the change.
- Parameters:
modifiedBy- value to be set- Returns:
- Builder
-
modifiedAt
Date and time (UTC) when the change was made.
- Parameters:
modifiedAt- value to be set- Returns:
- Builder
-
label
Information that describes the resource after the change.
- Parameters:
label- value to be set- Returns:
- Builder
-
label
public RecordBuilder label(Function<LabelBuilder, io.vrap.rmf.base.client.Builder<? extends Label>> builder) Information that describes the resource after the change.
- Parameters:
builder- function to build the label value- Returns:
- Builder
-
previousLabel
Information that describes the resource before the change.
- Parameters:
previousLabel- value to be set- Returns:
- Builder
-
previousLabel
public RecordBuilder previousLabel(Function<LabelBuilder, io.vrap.rmf.base.client.Builder<? extends Label>> builder) Information that describes the resource before the change.
- Parameters:
builder- function to build the previousLabel value- Returns:
- Builder
-
changes
Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes- value to be set- Returns:
- Builder
-
changes
Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes- value to be set- Returns:
- Builder
-
plusChanges
Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
changes- value to be set- Returns:
- Builder
-
plusChanges
public RecordBuilder plusChanges(Function<ChangeBuilder, io.vrap.rmf.base.client.Builder<? extends Change>> builder) Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
builder- function to build the changes value- Returns:
- Builder
-
withChanges
public RecordBuilder withChanges(Function<ChangeBuilder, io.vrap.rmf.base.client.Builder<? extends Change>> builder) Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Parameters:
builder- function to build the changes value- Returns:
- Builder
-
resource
public RecordBuilder resource(Function<ResourceIdentifierBuilder, ResourceIdentifierBuilder> builder) ResourceIdentifier of the changed resource.
- Parameters:
builder- function to build the resource value- Returns:
- Builder
-
withResource
ResourceIdentifier of the changed resource.
- Parameters:
builder- function to build the resource value- Returns:
- Builder
-
resource
ResourceIdentifier of the changed resource.
- Parameters:
resource- value to be set- Returns:
- Builder
-
stores
References to the Stores associated with the Change.
- Parameters:
stores- value to be set- Returns:
- Builder
-
stores
References to the Stores associated with the Change.
- Parameters:
stores- value to be set- Returns:
- Builder
-
plusStores
References to the Stores associated with the Change.
- Parameters:
stores- value to be set- Returns:
- Builder
-
plusStores
References to the Stores associated with the Change.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
withStores
References to the Stores associated with the Change.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
addStores
References to the Stores associated with the Change.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
setStores
References to the Stores associated with the Change.
- Parameters:
builder- function to build the stores value- Returns:
- Builder
-
withoutChanges
trueif no change was detected.The version number of the resource can be increased even without any change in the resource.
- Parameters:
withoutChanges- value to be set- Returns:
- Builder
-
getVersion
Version of the resource after the change.
For more information on how the version is incremented, see Optimistic Concurrency Control.
- Returns:
- version
-
getPreviousVersion
Version of the resource before the change.
- Returns:
- previousVersion
-
getType
Indicates the type of change. For creation, update, or deletion, the value is
"ResourceCreated","ResourceUpdated", or"ResourceDeleted"respectively.- Returns:
- type
-
getModifiedBy
Information about the user or API Client who performed the change.
- Returns:
- modifiedBy
-
getModifiedAt
Date and time (UTC) when the change was made.
- Returns:
- modifiedAt
-
getLabel
Information that describes the resource after the change.
- Returns:
- label
-
getPreviousLabel
Information that describes the resource before the change.
- Returns:
- previousLabel
-
getChanges
Shows the differences in the resource between
previousVersionandversion.The value is not identical to the actual array of update actions sent and is not limited to update actions (see, for example, Optimistic Concurrency Control).
- Returns:
- changes
-
getResource
ResourceIdentifier of the changed resource.
- Returns:
- resource
-
getStores
References to the Stores associated with the Change.
- Returns:
- stores
-
getWithoutChanges
trueif no change was detected.The version number of the resource can be increased even without any change in the resource.
- Returns:
- withoutChanges
-
build
builds Record with checking for non-null required values- Specified by:
buildin interfaceio.vrap.rmf.base.client.Builder<Record>- Returns:
- Record
-
buildUnchecked
builds Record without checking for non-null required values- Returns:
- Record
-
of
factory method for an instance of RecordBuilder- Returns:
- builder
-
of
create builder for Record instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-