Class V2MetricSpec
java.lang.Object
io.kubernetes.client.openapi.models.V2MetricSpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T21:15:49.397498Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V2MetricSpec
extends Object
MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_object(V2ObjectMetricSource _object) containerResource(V2ContainerResourceMetricSource containerResource) booleanexternal(V2ExternalMetricSource external) static V2MetricSpecCreate an instance of V2MetricSpec given an JSON stringGet containerResourceGet externalGet _objectgetPods()Get podsGet resourcegetType()type is the type of metric source.inthashCode()pods(V2PodsMetricSource pods) resource(V2ResourceMetricSource resource) voidsetContainerResource(V2ContainerResourceMetricSource containerResource) voidsetExternal(V2ExternalMetricSource external) voidsetObject(V2ObjectMetricSource _object) voidsetPods(V2PodsMetricSource pods) voidsetResource(V2ResourceMetricSource resource) voidtoJson()Convert an instance of V2MetricSpec to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_CONTAINER_RESOURCE
- See Also:
-
SERIALIZED_NAME_EXTERNAL
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_PODS
- See Also:
-
SERIALIZED_NAME_RESOURCE
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V2MetricSpec
public V2MetricSpec()
-
-
Method Details
-
containerResource
-
getContainerResource
Get containerResource- Returns:
- containerResource
-
setContainerResource
-
external
-
getExternal
Get external- Returns:
- external
-
setExternal
-
_object
-
getObject
Get _object- Returns:
- _object
-
setObject
-
pods
-
getPods
Get pods- Returns:
- pods
-
setPods
-
resource
-
getResource
Get resource- Returns:
- resource
-
setResource
-
type
-
getType
type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.- Returns:
- type
-
setType
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 V2MetricSpec
-
fromJson
Create an instance of V2MetricSpec given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V2MetricSpec
- Throws:
IOException- if the JSON string is invalid with respect to V2MetricSpec
-
toJson
Convert an instance of V2MetricSpec to an JSON string- Returns:
- JSON string
-