Class V2PodsMetricSource

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class V2PodsMetricSource extends Object
PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
  • Field Details

  • Constructor Details

    • V2PodsMetricSource

      public V2PodsMetricSource()
  • Method Details

    • metric

      public V2PodsMetricSource metric(V2MetricIdentifier metric)
    • getMetric

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

      public void setMetric(V2MetricIdentifier metric)
    • target

      public V2PodsMetricSource 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 V2PodsMetricSource
    • fromJson

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

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