Package com.io7m.brooklime.api
Class BLStagingRepositoryUpload
java.lang.Object
com.io7m.brooklime.api.BLStagingRepositoryUpload
- All Implemented Interfaces:
BLStagingRepositoryUploadType
public final class BLStagingRepositoryUpload
extends Object
implements BLStagingRepositoryUploadType
A request to upload a set of files to a staging repository.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeBLStagingRepositoryUpload. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forBLStagingRepositoryUpload.static BLStagingRepositoryUploadcopyOf(BLStagingRepositoryUploadType instance) Creates an immutable copy of aBLStagingRepositoryUploadTypevalue.booleanThis instance is equal to all instances ofBLStagingRepositoryUploadthat have equal attribute values.files()inthashCode()Computes a hash code from attributes:repositoryId,baseDirectory,files,retryDelay,retryCount.inttoString()Prints the immutable valueBLStagingRepositoryUploadwith attribute values.withBaseDirectory(Path value) Copy the current immutable object by setting a value for thebaseDirectoryattribute.Copy the current immutable object with elements that replace the content offiles.Copy the current immutable object with elements that replace the content offiles.withRepositoryId(String value) Copy the current immutable object by setting a value for therepositoryIdattribute.withRetryCount(int value) Copy the current immutable object by setting a value for theretryCountattribute.withRetryDelay(Duration value) Copy the current immutable object by setting a value for theretryDelayattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.brooklime.api.BLStagingRepositoryUploadType
checkPreconditions
-
Method Details
-
repositoryId
- Specified by:
repositoryIdin interfaceBLStagingRepositoryUploadType- Returns:
- The ID of the staging repository
-
baseDirectory
- Specified by:
baseDirectoryin interfaceBLStagingRepositoryUploadType- Returns:
- The base directory containing files
-
files
- Specified by:
filesin interfaceBLStagingRepositoryUploadType- Returns:
- The files to be uploaded
-
retryDelay
- Specified by:
retryDelayin interfaceBLStagingRepositoryUploadType- Returns:
- The duration by which to pause between failed upload attempts
-
retryCount
public int retryCount()- Specified by:
retryCountin interfaceBLStagingRepositoryUploadType- Returns:
- The maximum number of times to retry uploading any given file
-
withRepositoryId
Copy the current immutable object by setting a value for therepositoryIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for repositoryId- Returns:
- A modified copy of the
thisobject
-
withBaseDirectory
Copy the current immutable object by setting a value for thebaseDirectoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseDirectory- Returns:
- A modified copy of the
thisobject
-
withFiles
Copy the current immutable object with elements that replace the content offiles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFiles
Copy the current immutable object with elements that replace the content offiles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of files elements to set- Returns:
- A modified copy of
thisobject
-
withRetryDelay
Copy the current immutable object by setting a value for theretryDelayattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for retryDelay- Returns:
- A modified copy of the
thisobject
-
withRetryCount
Copy the current immutable object by setting a value for theretryCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for retryCount- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofBLStagingRepositoryUploadthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:repositoryId,baseDirectory,files,retryDelay,retryCount. -
toString
Prints the immutable valueBLStagingRepositoryUploadwith attribute values. -
copyOf
Creates an immutable copy of aBLStagingRepositoryUploadTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable BLStagingRepositoryUpload instance
-
builder
Creates a builder forBLStagingRepositoryUpload.BLStagingRepositoryUpload.builder() .setRepositoryId(String) // requiredrepositoryId.setBaseDirectory(java.nio.file.Path) // requiredbaseDirectory.addFiles|addAllFiles(java.nio.file.Path) //fileselements .setRetryDelay(java.time.Duration) // requiredretryDelay.setRetryCount(int) // requiredretryCount.build();- Returns:
- A new BLStagingRepositoryUpload builder
-