@NotThreadSafe public static final class ImmutableBackupPolicy.Builder extends Object
ImmutableBackupPolicy
.
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 ImmutableBackupPolicy.Builder from(BackupPolicy instance)
BackupPolicy
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 ImmutableBackupPolicy.Builder addBlackoutPeriods(BlackoutPeriod element)
blackoutPeriods
list.element
- A blackoutPeriods elementthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addBlackoutPeriods(BlackoutPeriod... elements)
blackoutPeriods
list.elements
- An array of blackoutPeriods elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder blackoutPeriods(Iterable<? extends BlackoutPeriod> elements)
blackoutPeriods
list.elements
- An iterable of blackoutPeriods elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addAllBlackoutPeriods(Iterable<? extends BlackoutPeriod> elements)
blackoutPeriods
list.elements
- An iterable of blackoutPeriods elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder daysToKeep(long daysToKeep)
daysToKeep
attribute.daysToKeep
- The value for daysToKeepthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder daysToKeepLog(long daysToKeepLog)
daysToKeepLog
to daysToKeepLog.daysToKeepLog
- The value for daysToKeepLogthis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder daysToKeepLog(Optional<Long> daysToKeepLog)
daysToKeepLog
to daysToKeepLog.daysToKeepLog
- The value for daysToKeepLogthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder daysToKeepSystem(long daysToKeepSystem)
daysToKeepSystem
to daysToKeepSystem.daysToKeepSystem
- The value for daysToKeepSystemthis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder daysToKeepSystem(Optional<Long> daysToKeepSystem)
daysToKeepSystem
to daysToKeepSystem.daysToKeepSystem
- The value for daysToKeepSystemthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder description(String description)
description
to description.description
- The value for descriptionthis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder description(Optional<String> description)
description
to description.description
- The value for descriptionthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addExtendedRetentionPolicies(ExtendedRetentionPolicy element)
extendedRetentionPolicies
list.element
- A extendedRetentionPolicies elementthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addExtendedRetentionPolicies(ExtendedRetentionPolicy... elements)
extendedRetentionPolicies
list.elements
- An array of extendedRetentionPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder extendedRetentionPolicies(Iterable<? extends ExtendedRetentionPolicy> elements)
extendedRetentionPolicies
list.elements
- An iterable of extendedRetentionPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addAllExtendedRetentionPolicies(Iterable<? extends ExtendedRetentionPolicy> elements)
extendedRetentionPolicies
list.elements
- An iterable of extendedRetentionPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder fullSchedulingPolicy(SchedulingPolicy fullSchedulingPolicy)
fullSchedulingPolicy
to fullSchedulingPolicy.fullSchedulingPolicy
- The value for fullSchedulingPolicythis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder fullSchedulingPolicy(Optional<? extends SchedulingPolicy> fullSchedulingPolicy)
fullSchedulingPolicy
to fullSchedulingPolicy.fullSchedulingPolicy
- The value for fullSchedulingPolicythis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder uid(PolicyUid uid)
uid
attribute.uid
- The value for uidthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder incrementalSchedulingPolicy(SchedulingPolicy incrementalSchedulingPolicy)
incrementalSchedulingPolicy
attribute.incrementalSchedulingPolicy
- The value for incrementalSchedulingPolicythis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder lastModifiedTime(Instant lastModifiedTime)
lastModifiedTime
to lastModifiedTime.lastModifiedTime
- The value for lastModifiedTimethis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder lastModifiedTime(Optional<? extends Instant> lastModifiedTime)
lastModifiedTime
to lastModifiedTime.lastModifiedTime
- The value for lastModifiedTimethis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder logSchedulingPolicy(SchedulingPolicy logSchedulingPolicy)
logSchedulingPolicy
to logSchedulingPolicy.logSchedulingPolicy
- The value for logSchedulingPolicythis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder logSchedulingPolicy(Optional<? extends SchedulingPolicy> logSchedulingPolicy)
logSchedulingPolicy
to logSchedulingPolicy.logSchedulingPolicy
- The value for logSchedulingPolicythis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder systemSchedulingPolicy(SchedulingPolicy systemSchedulingPolicy)
systemSchedulingPolicy
to systemSchedulingPolicy.systemSchedulingPolicy
- The value for systemSchedulingPolicythis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder systemSchedulingPolicy(Optional<? extends SchedulingPolicy> systemSchedulingPolicy)
systemSchedulingPolicy
to systemSchedulingPolicy.systemSchedulingPolicy
- The value for systemSchedulingPolicythis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder name(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder retries(int retries)
retries
attribute.retries
- The value for retriesthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder retryIntervalMins(int retryIntervalMins)
retryIntervalMins
attribute.retryIntervalMins
- The value for retryIntervalMinsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder skipIntervalMins(int skipIntervalMins)
skipIntervalMins
to skipIntervalMins.skipIntervalMins
- The value for skipIntervalMinsthis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder skipIntervalMins(Optional<Integer> skipIntervalMins)
skipIntervalMins
to skipIntervalMins.skipIntervalMins
- The value for skipIntervalMinsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addSnapshotArchivalCopyPolicies(SnapshotArchivalCopyPolicy element)
snapshotArchivalCopyPolicies
list.element
- A snapshotArchivalCopyPolicies elementthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addSnapshotArchivalCopyPolicies(SnapshotArchivalCopyPolicy... elements)
snapshotArchivalCopyPolicies
list.elements
- An array of snapshotArchivalCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder snapshotArchivalCopyPolicies(Iterable<? extends SnapshotArchivalCopyPolicy> elements)
snapshotArchivalCopyPolicies
list.elements
- An iterable of snapshotArchivalCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addAllSnapshotArchivalCopyPolicies(Iterable<? extends SnapshotArchivalCopyPolicy> elements)
snapshotArchivalCopyPolicies
list.elements
- An iterable of snapshotArchivalCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addSnapshotReplicationCopyPolicies(SnapshotReplicationCopyPolicy element)
snapshotReplicationCopyPolicies
list.element
- A snapshotReplicationCopyPolicies elementthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addSnapshotReplicationCopyPolicies(SnapshotReplicationCopyPolicy... elements)
snapshotReplicationCopyPolicies
list.elements
- An array of snapshotReplicationCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder snapshotReplicationCopyPolicies(Iterable<? extends SnapshotReplicationCopyPolicy> elements)
snapshotReplicationCopyPolicies
list.elements
- An iterable of snapshotReplicationCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder addAllSnapshotReplicationCopyPolicies(Iterable<? extends SnapshotReplicationCopyPolicy> elements)
snapshotReplicationCopyPolicies
list.elements
- An iterable of snapshotReplicationCopyPolicies elementsthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder scopeType(BackupPolicyScopeType scopeType)
scopeType
attribute.scopeType
- The value for scopeTypethis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder locationId(LocationId locationId)
locationId
attribute.locationId
- The value for locationIdthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder companyId(CompanyId companyId)
companyId
attribute.companyId
- The value for companyIdthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder orgUuid(OrgUuid orgUuid)
orgUuid
attribute.orgUuid
- The value for orgUuidthis
builder for use in a chained invocationpublic final ImmutableBackupPolicy.Builder vdcUuid(VdcUuid vdcUuid)
vdcUuid
to vdcUuid.vdcUuid
- The value for vdcUuidthis
builder for chained invocationpublic final ImmutableBackupPolicy.Builder vdcUuid(Optional<? extends VdcUuid> vdcUuid)
vdcUuid
to vdcUuid.vdcUuid
- The value for vdcUuidthis
builder for use in a chained invocationpublic ImmutableBackupPolicy build()
ImmutableBackupPolicy
.IllegalStateException
- if any required attributes are missingCopyright © 2023 iland Internet Solutions, Corp. All rights reserved.