Package org.cdk8s.plus24
Class NetworkPolicyRule.Builder
- java.lang.Object
-
- org.cdk8s.plus24.NetworkPolicyRule.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkPolicyRule>
- Enclosing interface:
- NetworkPolicyRule
@Stability(Stable) public static final class NetworkPolicyRule.Builder extends Object implements software.amazon.jsii.Builder<NetworkPolicyRule>
A builder forNetworkPolicyRule
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkPolicyRule
build()
Builds the configured instance.NetworkPolicyRule.Builder
peer(INetworkPolicyPeer peer)
Sets the value ofNetworkPolicyRule.getPeer()
NetworkPolicyRule.Builder
ports(List<? extends NetworkPolicyPort> ports)
Sets the value ofNetworkPolicyRule.getPorts()
-
-
-
Method Detail
-
peer
@Stability(Stable) public NetworkPolicyRule.Builder peer(INetworkPolicyPeer peer)
Sets the value ofNetworkPolicyRule.getPeer()
- Parameters:
peer
- Peer this rule interacts with. This parameter is required.- Returns:
this
-
ports
@Stability(Stable) public NetworkPolicyRule.Builder ports(List<? extends NetworkPolicyPort> ports)
Sets the value ofNetworkPolicyRule.getPorts()
- Parameters:
ports
- The ports of the rule.- Returns:
this
-
build
@Stability(Stable) public NetworkPolicyRule build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NetworkPolicyRule>
- Returns:
- a new instance of
NetworkPolicyRule
- Throws:
NullPointerException
- if any required attribute was not provided
-
-