Package io.github.cdklabs.projen
Class DockerComposeNetworkConfig.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.DockerComposeNetworkConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<DockerComposeNetworkConfig>
- Enclosing interface:
- DockerComposeNetworkConfig
@Stability(Experimental) public static final class DockerComposeNetworkConfig.Builder extends Object implements software.amazon.jsii.Builder<DockerComposeNetworkConfig>
A builder forDockerComposeNetworkConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
attachable
@Stability(Experimental) public DockerComposeNetworkConfig.Builder attachable(Boolean attachable)
Sets the value ofDockerComposeNetworkConfig.getAttachable()- Parameters:
attachable- Set to true to indicate that standalone containers can attach to this network, in addition to services.- Returns:
this
-
bridge
@Stability(Experimental) public DockerComposeNetworkConfig.Builder bridge(Boolean bridge)
Sets the value ofDockerComposeNetworkConfig.getBridge()- Parameters:
bridge- Set to true to indicate that the network is a bridge network.- Returns:
this
-
driver
@Stability(Experimental) public DockerComposeNetworkConfig.Builder driver(String driver)
Sets the value ofDockerComposeNetworkConfig.getDriver()- Parameters:
driver- Driver to use for the network.- Returns:
this
-
driverOpts
@Stability(Experimental) public DockerComposeNetworkConfig.Builder driverOpts(com.fasterxml.jackson.databind.node.ObjectNode driverOpts)
Sets the value ofDockerComposeNetworkConfig.getDriverOpts()- Parameters:
driverOpts- Options for the configured driver. Those options are driver-dependent - consult the driver’s documentation for more information- Returns:
this
-
external
@Stability(Experimental) public DockerComposeNetworkConfig.Builder external(Boolean external)
Sets the value ofDockerComposeNetworkConfig.getExternal()- Parameters:
external- Set to true to indicate that the network is externally created.- Returns:
this
-
internal
@Stability(Experimental) public DockerComposeNetworkConfig.Builder internal(Boolean internal)
Sets the value ofDockerComposeNetworkConfig.getInternal()- Parameters:
internal- Set to true to indicate that you want to create an externally isolated overlay network.- Returns:
this
-
ipam
@Stability(Experimental) public DockerComposeNetworkConfig.Builder ipam(DockerComposeNetworkIpamConfig ipam)
Sets the value ofDockerComposeNetworkConfig.getIpam()- Parameters:
ipam- Specify custom IPAM config.- Returns:
this
-
labels
@Stability(Experimental) public DockerComposeNetworkConfig.Builder labels(List<String> labels)
Sets the value ofDockerComposeNetworkConfig.getLabels()- Parameters:
labels- Attach labels to the network.- Returns:
this
-
name
@Stability(Experimental) public DockerComposeNetworkConfig.Builder name(String name)
Sets the value ofDockerComposeNetworkConfig.getName()- Parameters:
name- Name of the network for when the network name isn't going to work in YAML.- Returns:
this
-
overlay
@Stability(Experimental) public DockerComposeNetworkConfig.Builder overlay(Boolean overlay)
Sets the value ofDockerComposeNetworkConfig.getOverlay()- Parameters:
overlay- Set to true to indicate that the network is an overlay network.- Returns:
this
-
build
@Stability(Experimental) public DockerComposeNetworkConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<DockerComposeNetworkConfig>- Returns:
- a new instance of
DockerComposeNetworkConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-