Class BLStagingRepositoryUpload.Builder

java.lang.Object
com.io7m.brooklime.api.BLStagingRepositoryUpload.Builder
Enclosing class:
BLStagingRepositoryUpload

public static final class BLStagingRepositoryUpload.Builder
extends java.lang.Object
Builds instances of type BLStagingRepositoryUpload. 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.

  • Method Details

    • from

      Fill a builder with attribute values from the provided BLStagingRepositoryUploadType 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.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setRepositoryId

      public final BLStagingRepositoryUpload.Builder setRepositoryId​(java.lang.String repositoryId)
      Initializes the value for the repositoryId attribute.
      Parameters:
      repositoryId - The value for repositoryId
      Returns:
      this builder for use in a chained invocation
    • setBaseDirectory

      public final BLStagingRepositoryUpload.Builder setBaseDirectory​(java.nio.file.Path baseDirectory)
      Initializes the value for the baseDirectory attribute.
      Parameters:
      baseDirectory - The value for baseDirectory
      Returns:
      this builder for use in a chained invocation
    • addFiles

      public final BLStagingRepositoryUpload.Builder addFiles​(java.nio.file.Path element)
      Adds one element to files list.
      Parameters:
      element - A files element
      Returns:
      this builder for use in a chained invocation
    • addFiles

      public final BLStagingRepositoryUpload.Builder addFiles​(java.nio.file.Path... elements)
      Adds elements to files list.
      Parameters:
      elements - An array of files elements
      Returns:
      this builder 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 for files list.
      Parameters:
      elements - An iterable of files elements
      Returns:
      this builder for use in a chained invocation
    • addAllFiles

      public final BLStagingRepositoryUpload.Builder addAllFiles​(java.lang.Iterable<? extends java.nio.file.Path> elements)
      Adds elements to files list.
      Parameters:
      elements - An iterable of files elements
      Returns:
      this builder for use in a chained invocation
    • setRetryDelay

      public final BLStagingRepositoryUpload.Builder setRetryDelay​(java.time.Duration retryDelay)
      Initializes the value for the retryDelay attribute.
      Parameters:
      retryDelay - The value for retryDelay
      Returns:
      this builder for use in a chained invocation
    • setRetryCount

      public final BLStagingRepositoryUpload.Builder setRetryCount​(int retryCount)
      Initializes the value for the retryCount attribute.
      Parameters:
      retryCount - The value for retryCount
      Returns:
      this builder for use in a chained invocation
    • build

      public BLStagingRepositoryUpload build()
      Returns:
      An immutable instance of BLStagingRepositoryUpload
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing