Class V1NetworkPolicyIngressRule
java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1NetworkPolicyIngressRule
@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class V1NetworkPolicyIngressRule
extends Object
NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddfromItem
(V1NetworkPolicyPeer fromItem) Add an item to the from property in a chainable fashion.addportsItem
(V1NetworkPolicyPort portsItem) Add an item to the ports property in a chainable fashion.boolean
from
(List<@Valid V1NetworkPolicyPeer> from) Set from in a chainable fashion.List<@Valid V1NetworkPolicyPeer>
getFrom()
from is a list of sources which should be able to access the pods selected for this rule.List<@Valid V1NetworkPolicyPort>
getPorts()
ports is a list of ports which should be made accessible on the pods selected for this rule.int
hashCode()
ports
(List<@Valid V1NetworkPolicyPort> ports) Set ports in a chainable fashion.void
setFrom
(List<@Valid V1NetworkPolicyPeer> from) Set the from property valuevoid
setPorts
(List<@Valid V1NetworkPolicyPort> ports) Set the ports property valuetoString()
-
Field Details
-
JSON_PROPERTY_FROM
- See Also:
-
JSON_PROPERTY_PORTS
- See Also:
-
-
Constructor Details
-
V1NetworkPolicyIngressRule
public V1NetworkPolicyIngressRule()
-
-
Method Details
-
getFrom
from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.- Returns:
- the from property value
-
setFrom
Set the from property value- Parameters:
from
- property value to set
-
from
Set from in a chainable fashion.- Returns:
- The same instance of V1NetworkPolicyIngressRule for chaining.
-
addfromItem
Add an item to the from property in a chainable fashion.- Returns:
- The same instance of V1NetworkPolicyIngressRule for chaining.
-
getPorts
ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.- Returns:
- the ports property value
-
setPorts
Set the ports property value- Parameters:
ports
- property value to set
-
ports
Set ports in a chainable fashion.- Returns:
- The same instance of V1NetworkPolicyIngressRule for chaining.
-
addportsItem
Add an item to the ports property in a chainable fashion.- Returns:
- The same instance of V1NetworkPolicyIngressRule for chaining.
-
equals
-
hashCode
public int hashCode() -
toString
-