Class ImmutableGitInit.Builder

java.lang.Object
io.resys.hdes.client.spi.ImmutableGitInit.Builder
Enclosing class:
ImmutableGitInit

@NotThreadSafe
public static final class ImmutableGitInit.Builder
extends Object
Builds instances of type ImmutableGitInit. 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

      @CanIgnoreReturnValue public final ImmutableGitInit.Builder from​(GitConfig.GitInit instance)
      Fill a builder with attribute values from the provided GitInit instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • branch

      @CanIgnoreReturnValue public final ImmutableGitInit.Builder branch​(String branch)
      Initializes the value for the branch attribute.
      Parameters:
      branch - The value for branch
      Returns:
      this builder for use in a chained invocation
    • remote

      @CanIgnoreReturnValue public final ImmutableGitInit.Builder remote​(String remote)
      Initializes the value for the remote attribute.
      Parameters:
      remote - The value for remote
      Returns:
      this builder for use in a chained invocation
    • sshPath

      @CanIgnoreReturnValue public final ImmutableGitInit.Builder sshPath​(String sshPath)
      Initializes the value for the sshPath attribute.
      Parameters:
      sshPath - The value for sshPath
      Returns:
      this builder for use in a chained invocation
    • storage

      @CanIgnoreReturnValue public final ImmutableGitInit.Builder storage​(String storage)
      Initializes the value for the storage attribute.
      Parameters:
      storage - The value for storage
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableGitInit build()
      Builds a new ImmutableGitInit.
      Returns:
      An immutable instance of GitInit
      Throws:
      IllegalStateException - if any required attributes are missing