Class ComposeConfig.Builder

java.lang.Object
io.spring.initializr.generator.container.docker.compose.ComposeConfig.Builder
Enclosing class:
ComposeConfig

public static final class ComposeConfig.Builder extends Object
Builder for ComposeConfig.
Author:
Moritz Halbritter
  • Method Details

    • name

      public ComposeConfig.Builder name(@Nullable String name)
      Set the name of the config.
      Parameters:
      name - the name
      Returns:
      this for method chaining
    • build

      public ComposeConfig build()
      Builds the ComposeConfig instance.
      Returns:
      the built instance
    • forFile

      public static ComposeConfig.Builder forFile(String file)
      Create a builder for a config backed by a file.
      Parameters:
      file - the file
      Returns:
      the builder
    • forEnvironment

      public static ComposeConfig.Builder forEnvironment(String environment)
      Create a builder for a config backed by an environment variable.
      Parameters:
      environment - the environment variable
      Returns:
      the builder
    • forContent

      public static ComposeConfig.Builder forContent(String content)
      Create a builder for a config with inline content.
      Parameters:
      content - the content
      Returns:
      the builder
    • forExternal

      public static ComposeConfig.Builder forExternal()
      Create a builder for an external config.
      Returns:
      the builder