Package org.cdk8s.plus24
Class NetworkPolicyPortProps.Builder
- java.lang.Object
-
- org.cdk8s.plus24.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 NetworkPolicyPortProps
build()
Builds the configured instance.NetworkPolicyPortProps.Builder
endPort(Number endPort)
Sets the value ofNetworkPolicyPortProps.getEndPort()
NetworkPolicyPortProps.Builder
port(Number port)
Sets the value ofNetworkPolicyPortProps.getPort()
NetworkPolicyPortProps.Builder
protocol(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 to `port`). Only applies ifport
is 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:
build
in interfacesoftware.amazon.jsii.Builder<NetworkPolicyPortProps>
- Returns:
- a new instance of
NetworkPolicyPortProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-