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 Details

  • Constructor Details

    • V1NetworkPolicyIngressRule

      public V1NetworkPolicyIngressRule()
  • Method Details

    • getFrom

      public List<@Valid V1NetworkPolicyPeer> 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

      public void setFrom(List<@Valid V1NetworkPolicyPeer> from)
      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

      public V1NetworkPolicyIngressRule addfromItem(V1NetworkPolicyPeer fromItem)
      Add an item to the from property in a chainable fashion.
      Returns:
      The same instance of V1NetworkPolicyIngressRule for chaining.
    • getPorts

      public List<@Valid V1NetworkPolicyPort> 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

      public void setPorts(List<@Valid V1NetworkPolicyPort> ports)
      Set the ports property value
      Parameters:
      ports - property value to set
    • ports

      public V1NetworkPolicyIngressRule ports(List<@Valid V1NetworkPolicyPort> ports)
      Set ports in a chainable fashion.
      Returns:
      The same instance of V1NetworkPolicyIngressRule for chaining.
    • addportsItem

      public V1NetworkPolicyIngressRule addportsItem(V1NetworkPolicyPort portsItem)
      Add an item to the ports property in a chainable fashion.
      Returns:
      The same instance of V1NetworkPolicyIngressRule for chaining.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object