Package com.io7m.brooklime.api
Class BLStagingRepositoryUpload.Builder
- java.lang.Object
-
- com.io7m.brooklime.api.BLStagingRepositoryUpload.Builder
-
- Enclosing class:
- BLStagingRepositoryUpload
public static final class BLStagingRepositoryUpload.Builder extends java.lang.ObjectBuilds instances of typeBLStagingRepositoryUpload. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BLStagingRepositoryUpload.BuilderaddAllFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)Adds elements tofileslist.BLStagingRepositoryUpload.BuilderaddFiles(java.nio.file.Path element)Adds one element tofileslist.BLStagingRepositoryUpload.BuilderaddFiles(java.nio.file.Path... elements)Adds elements tofileslist.BLStagingRepositoryUploadbuild()Builds a newBLStagingRepositoryUpload.BLStagingRepositoryUpload.Builderfrom(BLStagingRepositoryUploadType instance)Fill a builder with attribute values from the providedBLStagingRepositoryUploadTypeinstance.BLStagingRepositoryUpload.BuildersetBaseDirectory(java.nio.file.Path baseDirectory)Initializes the value for thebaseDirectoryattribute.BLStagingRepositoryUpload.BuildersetFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)Sets or replaces all elements forfileslist.BLStagingRepositoryUpload.BuildersetRepositoryId(java.lang.String repositoryId)Initializes the value for therepositoryIdattribute.BLStagingRepositoryUpload.BuildersetRetryCount(int retryCount)Initializes the value for theretryCountattribute.BLStagingRepositoryUpload.BuildersetRetryDelay(java.time.Duration retryDelay)Initializes the value for theretryDelayattribute.
-
-
-
Method Detail
-
from
public final BLStagingRepositoryUpload.Builder from(BLStagingRepositoryUploadType instance)
Fill a builder with attribute values from the providedBLStagingRepositoryUploadTypeinstance. 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.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setRepositoryId
public final BLStagingRepositoryUpload.Builder setRepositoryId(java.lang.String repositoryId)
Initializes the value for therepositoryIdattribute.- Parameters:
repositoryId- The value for repositoryId- Returns:
thisbuilder for use in a chained invocation
-
setBaseDirectory
public final BLStagingRepositoryUpload.Builder setBaseDirectory(java.nio.file.Path baseDirectory)
Initializes the value for thebaseDirectoryattribute.- Parameters:
baseDirectory- The value for baseDirectory- Returns:
thisbuilder for use in a chained invocation
-
addFiles
public final BLStagingRepositoryUpload.Builder addFiles(java.nio.file.Path element)
Adds one element tofileslist.- Parameters:
element- A files element- Returns:
thisbuilder for use in a chained invocation
-
addFiles
public final BLStagingRepositoryUpload.Builder addFiles(java.nio.file.Path... elements)
Adds elements tofileslist.- Parameters:
elements- An array of files elements- Returns:
thisbuilder for use in a chained invocation
-
setFiles
public final BLStagingRepositoryUpload.Builder setFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)
Sets or replaces all elements forfileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFiles
public final BLStagingRepositoryUpload.Builder addAllFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)
Adds elements tofileslist.- Parameters:
elements- An iterable of files elements- Returns:
thisbuilder for use in a chained invocation
-
setRetryDelay
public final BLStagingRepositoryUpload.Builder setRetryDelay(java.time.Duration retryDelay)
Initializes the value for theretryDelayattribute.- Parameters:
retryDelay- The value for retryDelay- Returns:
thisbuilder for use in a chained invocation
-
setRetryCount
public final BLStagingRepositoryUpload.Builder setRetryCount(int retryCount)
Initializes the value for theretryCountattribute.- Parameters:
retryCount- The value for retryCount- Returns:
thisbuilder for use in a chained invocation
-
build
public BLStagingRepositoryUpload build()
Builds a newBLStagingRepositoryUpload.- Returns:
- An immutable instance of BLStagingRepositoryUpload
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-