Class V2ExternalMetricSource

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class V2ExternalMetricSource extends Object
ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
  • Field Details

  • Constructor Details

    • V2ExternalMetricSource

      public V2ExternalMetricSource()
  • Method Details

    • metric

    • getMetric

      @Nonnull public V2MetricIdentifier getMetric()
      Get metric
      Returns:
      metric
    • setMetric

      public void setMetric(V2MetricIdentifier metric)
    • target

      public V2ExternalMetricSource target(V2MetricTarget target)
    • getTarget

      @Nonnull public V2MetricTarget getTarget()
      Get target
      Returns:
      target
    • setTarget

      public void setTarget(V2MetricTarget target)
    • 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 V2ExternalMetricSource
    • fromJson

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

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