Package io.github.cdklabs.projen
Class DockerComposeServicePort.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.DockerComposeServicePort.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<DockerComposeServicePort>
- Enclosing interface:
- DockerComposeServicePort
@Stability(Experimental) public static final class DockerComposeServicePort.Builder extends Object implements software.amazon.jsii.Builder<DockerComposeServicePort>
A builder forDockerComposeServicePort
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DockerComposeServicePortbuild()Builds the configured instance.DockerComposeServicePort.Buildermode(String mode)Sets the value ofDockerComposeServicePort.getMode()DockerComposeServicePort.Builderprotocol(DockerComposeProtocol protocol)Sets the value ofDockerComposeServicePort.getProtocol()DockerComposeServicePort.Builderpublished(Number published)Sets the value ofDockerComposeServicePort.getPublished()DockerComposeServicePort.Buildertarget(Number target)Sets the value ofDockerComposeServicePort.getTarget()
-
-
-
Method Detail
-
mode
@Stability(Experimental) public DockerComposeServicePort.Builder mode(String mode)
Sets the value ofDockerComposeServicePort.getMode()- Parameters:
mode- Port mapping mode. This parameter is required.- Returns:
this
-
protocol
@Stability(Experimental) public DockerComposeServicePort.Builder protocol(DockerComposeProtocol protocol)
Sets the value ofDockerComposeServicePort.getProtocol()- Parameters:
protocol- Network protocol. This parameter is required.- Returns:
this
-
published
@Stability(Experimental) public DockerComposeServicePort.Builder published(Number published)
Sets the value ofDockerComposeServicePort.getPublished()- Parameters:
published- Published port number. This parameter is required.- Returns:
this
-
target
@Stability(Experimental) public DockerComposeServicePort.Builder target(Number target)
Sets the value ofDockerComposeServicePort.getTarget()- Parameters:
target- Target port number. This parameter is required.- Returns:
this
-
build
@Stability(Experimental) public DockerComposeServicePort build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<DockerComposeServicePort>- Returns:
- a new instance of
DockerComposeServicePort - Throws:
NullPointerException- if any required attribute was not provided
-
-