Class V1IPBlock

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1IPBlock extends Object
IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.
  • Field Details

  • Constructor Details

    • V1IPBlock

      public V1IPBlock()
  • Method Details

    • cidr

      public V1IPBlock cidr(String cidr)
    • getCidr

      @Nonnull public String getCidr()
      cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"
      Returns:
      cidr
    • setCidr

      public void setCidr(String cidr)
    • except

      public V1IPBlock except(List<String> except)
    • addExceptItem

      public V1IPBlock addExceptItem(String exceptItem)
    • getExcept

      @Nullable public List<String> getExcept()
      except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\" Except values will be rejected if they are outside the cidr range
      Returns:
      except
    • setExcept

      public void setExcept(List<String> except)
    • 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
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1IPBlock
    • fromJson

      public static V1IPBlock fromJson(String jsonString) throws IOException
      Create an instance of V1IPBlock given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1IPBlock
      Throws:
      IOException - if the JSON string is invalid with respect to V1IPBlock
    • toJson

      public String toJson()
      Convert an instance of V1IPBlock to an JSON string
      Returns:
      JSON string