Class V1NetworkPolicyPort

java.lang.Object
io.kubernetes.client.openapi.models.V1NetworkPolicyPort

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-06-18T15:05:57.863601Z[Etc/UTC]") public class V1NetworkPolicyPort extends Object
NetworkPolicyPort describes a port to allow traffic on
  • Field Details

  • Constructor Details

    • V1NetworkPolicyPort

      public V1NetworkPolicyPort()
  • Method Details

    • endPort

      public V1NetworkPolicyPort endPort(Integer endPort)
    • getEndPort

      @Nullable public Integer getEndPort()
      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:
      endPort
    • setEndPort

      public void setEndPort(Integer endPort)
    • port

      public V1NetworkPolicyPort port(IntOrString port)
    • getPort

      @Nullable public IntOrString getPort()
      IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
      Returns:
      port
    • setPort

      public void setPort(IntOrString port)
    • protocol

      public V1NetworkPolicyPort protocol(String protocol)
    • getProtocol

      @Nullable public String getProtocol()
      protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
      Returns:
      protocol
    • setProtocol

      public void setProtocol(String protocol)
    • 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