Class MetricSpec
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.autoscaling.v2beta2.MetricSpec
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class MetricSpec extends java.lang.Object implements com.marcnuri.yakc.model.Model
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 Modifier and Type Class Description static class
MetricSpec.Builder
-
Constructor Summary
Constructors Constructor Description MetricSpec()
MetricSpec(ContainerResourceMetricSource containerResource, ExternalMetricSource external, ObjectMetricSource object, PodsMetricSource pods, ResourceMetricSource resource, @NonNull java.lang.String type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetricSpec.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
ContainerResourceMetricSource
getContainerResource()
ExternalMetricSource
getExternal()
ObjectMetricSource
getObject()
PodsMetricSource
getPods()
ResourceMetricSource
getResource()
@NonNull java.lang.String
getType()
type is the type of metric source.int
hashCode()
void
setContainerResource(ContainerResourceMetricSource containerResource)
void
setExternal(ExternalMetricSource external)
void
setObject(ObjectMetricSource object)
void
setPods(PodsMetricSource pods)
void
setResource(ResourceMetricSource resource)
void
setType(@NonNull java.lang.String type)
type is the type of metric source.MetricSpec.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
MetricSpec
public MetricSpec(ContainerResourceMetricSource containerResource, ExternalMetricSource external, ObjectMetricSource object, PodsMetricSource pods, ResourceMetricSource resource, @NonNull @NonNull java.lang.String type)
-
MetricSpec
public MetricSpec()
-
-
Method Detail
-
builder
public static MetricSpec.Builder builder()
-
toBuilder
public MetricSpec.Builder toBuilder()
-
getContainerResource
public ContainerResourceMetricSource getContainerResource()
-
getExternal
public ExternalMetricSource getExternal()
-
getObject
public ObjectMetricSource getObject()
-
getPods
public PodsMetricSource getPods()
-
getResource
public ResourceMetricSource getResource()
-
getType
@NonNull public @NonNull java.lang.String 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. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled
-
setContainerResource
public void setContainerResource(ContainerResourceMetricSource containerResource)
-
setExternal
public void setExternal(ExternalMetricSource external)
-
setObject
public void setObject(ObjectMetricSource object)
-
setPods
public void setPods(PodsMetricSource pods)
-
setResource
public void setResource(ResourceMetricSource resource)
-
setType
public void setType(@NonNull @NonNull java.lang.String type)
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. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-