Class V1CustomResourceConversion

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1CustomResourceConversion extends Object
CustomResourceConversion describes how to convert different versions of a CR.
  • Field Details

  • Constructor Details

    • V1CustomResourceConversion

      public V1CustomResourceConversion()
  • Method Details

    • strategy

      public V1CustomResourceConversion strategy(String strategy)
    • getStrategy

      @Nonnull public String getStrategy()
      strategy specifies how custom resources are converted between versions. Allowed values are: - `\"None\"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `\"Webhook\"`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
      Returns:
      strategy
    • setStrategy

      public void setStrategy(String strategy)
    • webhook

    • getWebhook

      @Nullable public V1WebhookConversion getWebhook()
      Get webhook
      Returns:
      webhook
    • setWebhook

      public void setWebhook(V1WebhookConversion webhook)
    • 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 V1CustomResourceConversion
    • fromJson

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

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