Class NetworkPolicyPort.Builder
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.networking.v1.NetworkPolicyPort.Builder
-
- Enclosing class:
- NetworkPolicyPort
public static class NetworkPolicyPort.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkPolicyPort
build()
NetworkPolicyPort.Builder
endPort(java.lang.Number endPort)
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.NetworkPolicyPort.Builder
port(java.lang.String port)
NetworkPolicyPort.Builder
protocol(java.lang.String protocol)
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.java.lang.String
toString()
-
-
-
Method Detail
-
endPort
public NetworkPolicyPort.Builder endPort(java.lang.Number endPort)
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.- Returns:
this
.
-
port
public NetworkPolicyPort.Builder port(java.lang.String port)
- Returns:
this
.
-
protocol
public NetworkPolicyPort.Builder protocol(java.lang.String protocol)
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.- Returns:
this
.
-
build
public NetworkPolicyPort build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-