Class V1NetworkPolicyEgressRule

java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1NetworkPolicyEgressRule

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V1NetworkPolicyEgressRule extends Object
NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8
  • Field Details

  • Constructor Details

    • V1NetworkPolicyEgressRule

      public V1NetworkPolicyEgressRule()
  • Method Details

    • getPorts

      public List<@Valid V1NetworkPolicyPort> getPorts()
      ports is a list of destination ports for outgoing traffic. 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
    • ports

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

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

      public List<@Valid V1NetworkPolicyPeer> getTo()
      to is a list of destinations for outgoing traffic of 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 destinations (traffic not restricted by destination). 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 to list.
      Returns:
      the to property value
    • setTo

      public void setTo(List<@Valid V1NetworkPolicyPeer> to)
      Set the to property value
    • to

      Set to in a chainable fashion.
      Returns:
      The same instance of V1NetworkPolicyEgressRule for chaining.
    • addtoItem

      Add an item to the to property in a chainable fashion.
      Returns:
      The same instance of V1NetworkPolicyEgressRule 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