Package org.cdk8s.plus25
Class NetworkPolicyPortProps.Builder
- java.lang.Object
-
- org.cdk8s.plus25.NetworkPolicyPortProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkPolicyPortProps>
- Enclosing interface:
- NetworkPolicyPortProps
@Stability(Stable) public static final class NetworkPolicyPortProps.Builder extends Object implements software.amazon.jsii.Builder<NetworkPolicyPortProps>
A builder forNetworkPolicyPortProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkPolicyPortPropsbuild()Builds the configured instance.NetworkPolicyPortProps.BuilderendPort(Number endPort)Sets the value ofNetworkPolicyPortProps.getEndPort()NetworkPolicyPortProps.Builderport(Number port)Sets the value ofNetworkPolicyPortProps.getPort()NetworkPolicyPortProps.Builderprotocol(NetworkProtocol protocol)Sets the value ofNetworkPolicyPortProps.getProtocol()
-
-
-
Method Detail
-
endPort
@Stability(Stable) public NetworkPolicyPortProps.Builder endPort(Number endPort)
Sets the value ofNetworkPolicyPortProps.getEndPort()- Parameters:
endPort- End port (relative toport). Only applies ifportis defined. Use this to specify a port range, rather that a specific one.- Returns:
this
-
port
@Stability(Stable) public NetworkPolicyPortProps.Builder port(Number port)
Sets the value ofNetworkPolicyPortProps.getPort()- Parameters:
port- Specific port number.- Returns:
this
-
protocol
@Stability(Stable) public NetworkPolicyPortProps.Builder protocol(NetworkProtocol protocol)
Sets the value ofNetworkPolicyPortProps.getProtocol()- Parameters:
protocol- Protocol.- Returns:
this
-
build
@Stability(Stable) public NetworkPolicyPortProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<NetworkPolicyPortProps>- Returns:
- a new instance of
NetworkPolicyPortProps - Throws:
NullPointerException- if any required attribute was not provided
-
-