Package com.io7m.brooklime.api
Class BLStagingRepositoryUpload
- java.lang.Object
-
- com.io7m.brooklime.api.BLStagingRepositoryUpload
-
- All Implemented Interfaces:
BLStagingRepositoryUploadType
public final class BLStagingRepositoryUpload extends java.lang.Object implements BLStagingRepositoryUploadType
A request to upload a set of files to a staging repository.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBLStagingRepositoryUpload.BuilderBuilds instances of typeBLStagingRepositoryUpload.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathbaseDirectory()static BLStagingRepositoryUpload.Builderbuilder()Creates a builder forBLStagingRepositoryUpload.static BLStagingRepositoryUploadcopyOf(BLStagingRepositoryUploadType instance)Creates an immutable copy of aBLStagingRepositoryUploadTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofBLStagingRepositoryUploadthat have equal attribute values.java.util.List<java.nio.file.Path>files()inthashCode()Computes a hash code from attributes:repositoryId,baseDirectory,files,retryDelay,retryCount.java.lang.StringrepositoryId()intretryCount()java.time.DurationretryDelay()java.lang.StringtoString()Prints the immutable valueBLStagingRepositoryUploadwith attribute values.BLStagingRepositoryUploadwithBaseDirectory(java.nio.file.Path value)Copy the current immutable object by setting a value for thebaseDirectoryattribute.BLStagingRepositoryUploadwithFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)Copy the current immutable object with elements that replace the content offiles.BLStagingRepositoryUploadwithFiles(java.nio.file.Path... elements)Copy the current immutable object with elements that replace the content offiles.BLStagingRepositoryUploadwithRepositoryId(java.lang.String value)Copy the current immutable object by setting a value for therepositoryIdattribute.BLStagingRepositoryUploadwithRetryCount(int value)Copy the current immutable object by setting a value for theretryCountattribute.BLStagingRepositoryUploadwithRetryDelay(java.time.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, wait
-
Methods inherited from interface com.io7m.brooklime.api.BLStagingRepositoryUploadType
checkPreconditions
-
-
-
-
Method Detail
-
repositoryId
public java.lang.String repositoryId()
- Specified by:
repositoryIdin interfaceBLStagingRepositoryUploadType- Returns:
- The ID of the staging repository
-
baseDirectory
public java.nio.file.Path baseDirectory()
- Specified by:
baseDirectoryin interfaceBLStagingRepositoryUploadType- Returns:
- The base directory containing files
-
files
public java.util.List<java.nio.file.Path> files()
- Specified by:
filesin interfaceBLStagingRepositoryUploadType- Returns:
- The files to be uploaded
-
retryDelay
public java.time.Duration 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
public final BLStagingRepositoryUpload withRepositoryId(java.lang.String value)
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
public final BLStagingRepositoryUpload withBaseDirectory(java.nio.file.Path value)
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
public final BLStagingRepositoryUpload withFiles(java.nio.file.Path... elements)
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
public final BLStagingRepositoryUpload withFiles(java.lang.Iterable<? extends java.nio.file.Path> elements)
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
public final BLStagingRepositoryUpload withRetryDelay(java.time.Duration value)
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
public final BLStagingRepositoryUpload withRetryCount(int value)
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
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofBLStagingRepositoryUploadthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:repositoryId,baseDirectory,files,retryDelay,retryCount.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueBLStagingRepositoryUploadwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static BLStagingRepositoryUpload copyOf(BLStagingRepositoryUploadType instance)
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
public static BLStagingRepositoryUpload.Builder 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
-
-