Class V1HostAlias

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1HostAlias extends Object
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.
  • Field Details

  • Constructor Details

    • V1HostAlias

      public V1HostAlias()
  • Method Details

    • hostnames

      public V1HostAlias hostnames(List<String> hostnames)
    • addHostnamesItem

      public V1HostAlias addHostnamesItem(String hostnamesItem)
    • getHostnames

      @Nullable public List<String> getHostnames()
      Hostnames for the above IP address.
      Returns:
      hostnames
    • setHostnames

      public void setHostnames(List<String> hostnames)
    • ip

      public V1HostAlias ip(String ip)
    • getIp

      @Nonnull public String getIp()
      IP address of the host file entry.
      Returns:
      ip
    • setIp

      public void setIp(String ip)
    • 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
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to V1HostAlias
    • fromJson

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

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