@NotThreadSafe public static final class ImmutableBackupRun.Builder extends Object
ImmutableBackupRun
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
public final ImmutableBackupRun.Builder from(BackupRun instance)
BackupRun
instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder errorMessage(String errorMessage)
errorMessage
to errorMessage.errorMessage
- The value for errorMessagethis
builder for chained invocationpublic final ImmutableBackupRun.Builder errorMessage(Optional<String> errorMessage)
errorMessage
to errorMessage.errorMessage
- The value for errorMessagethis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder successMessage(String successMessage)
successMessage
to successMessage.successMessage
- The value for successMessagethis
builder for chained invocationpublic final ImmutableBackupRun.Builder successMessage(Optional<String> successMessage)
successMessage
to successMessage.successMessage
- The value for successMessagethis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder metadataDeleted(boolean metadataDeleted)
metadataDeleted
attribute.metadataDeleted
- The value for metadataDeletedthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder quiesced(boolean quiesced)
quiesced
attribute.quiesced
- The value for quiescedthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder runType(RunType runType)
runType
attribute.runType
- The value for runTypethis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder slaViolated(boolean slaViolated)
slaViolated
to slaViolated.slaViolated
- The value for slaViolatedthis
builder for chained invocationpublic final ImmutableBackupRun.Builder slaViolated(Optional<Boolean> slaViolated)
slaViolated
to slaViolated.slaViolated
- The value for slaViolatedthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder snapshotsDeleted(boolean snapshotsDeleted)
snapshotsDeleted
attribute.snapshotsDeleted
- The value for snapshotsDeletedthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder snapshotsDeletedTime(Instant snapshotsDeletedTime)
snapshotsDeletedTime
to snapshotsDeletedTime.snapshotsDeletedTime
- The value for snapshotsDeletedTimethis
builder for chained invocationpublic final ImmutableBackupRun.Builder snapshotsDeletedTime(Optional<? extends Instant> snapshotsDeletedTime)
snapshotsDeletedTime
to snapshotsDeletedTime.snapshotsDeletedTime
- The value for snapshotsDeletedTimethis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addSourceBackupStatus(SourceBackupStatus element)
sourceBackupStatus
set.element
- A sourceBackupStatus elementthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addSourceBackupStatus(SourceBackupStatus... elements)
sourceBackupStatus
set.elements
- An array of sourceBackupStatus elementsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder sourceBackupStatus(Iterable<? extends SourceBackupStatus> elements)
sourceBackupStatus
set.elements
- An iterable of sourceBackupStatus elementsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addAllSourceBackupStatus(Iterable<? extends SourceBackupStatus> elements)
sourceBackupStatus
set.elements
- An iterable of sourceBackupStatus elementsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder stats(BackupRunStats stats)
stats
attribute.stats
- The value for statsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder status(StatusBackupRun status)
status
attribute.status
- The value for statusthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addWarnings(String element)
warnings
list.element
- A warnings elementthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addWarnings(String... elements)
warnings
list.elements
- An array of warnings elementsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder warnings(Iterable<String> elements)
warnings
list.elements
- An iterable of warnings elementsthis
builder for use in a chained invocationpublic final ImmutableBackupRun.Builder addAllWarnings(Iterable<String> elements)
warnings
list.elements
- An iterable of warnings elementsthis
builder for use in a chained invocationpublic ImmutableBackupRun build()
ImmutableBackupRun
.IllegalStateException
- if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.