Class V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
io.kubernetes.client.proto.V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder, Cloneable
Enclosing class:
V2beta1Autoscaling.HorizontalPodAutoscalerSpec

public static final class V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder> implements V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
 HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
 
Protobuf type k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • getDefaultInstanceForType

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • setField

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • clearField

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • clearOneof

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • setRepeatedField

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • addRepeatedField

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • mergeFrom

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • mergeFrom

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
      Throws:
      IOException
    • hasScaleTargetRef

      public boolean hasScaleTargetRef()
       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
      Specified by:
      hasScaleTargetRef in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getScaleTargetRef

       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
      Specified by:
      getScaleTargetRef in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • setScaleTargetRef

       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
    • setScaleTargetRef

       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
    • mergeScaleTargetRef

       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
    • clearScaleTargetRef

       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
    • getScaleTargetRefBuilder

      public V2beta1Autoscaling.CrossVersionObjectReference.Builder getScaleTargetRefBuilder()
       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
    • getScaleTargetRefOrBuilder

      public V2beta1Autoscaling.CrossVersionObjectReferenceOrBuilder getScaleTargetRefOrBuilder()
       scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
       should be collected, as well as to actually change the replica count.
       
      optional .k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference scaleTargetRef = 1;
      Specified by:
      getScaleTargetRefOrBuilder in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • hasMinReplicas

      public boolean hasMinReplicas()
       minReplicas is the lower limit for the number of replicas to which the autoscaler
       can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the
       alpha feature gate HPAScaleToZero is enabled and at least one Object or External
       metric is configured.  Scaling is active as long as at least one metric value is
       available.
       +optional
       
      optional int32 minReplicas = 2;
      Specified by:
      hasMinReplicas in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getMinReplicas

      public int getMinReplicas()
       minReplicas is the lower limit for the number of replicas to which the autoscaler
       can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the
       alpha feature gate HPAScaleToZero is enabled and at least one Object or External
       metric is configured.  Scaling is active as long as at least one metric value is
       available.
       +optional
       
      optional int32 minReplicas = 2;
      Specified by:
      getMinReplicas in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • setMinReplicas

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder setMinReplicas(int value)
       minReplicas is the lower limit for the number of replicas to which the autoscaler
       can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the
       alpha feature gate HPAScaleToZero is enabled and at least one Object or External
       metric is configured.  Scaling is active as long as at least one metric value is
       available.
       +optional
       
      optional int32 minReplicas = 2;
    • clearMinReplicas

       minReplicas is the lower limit for the number of replicas to which the autoscaler
       can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the
       alpha feature gate HPAScaleToZero is enabled and at least one Object or External
       metric is configured.  Scaling is active as long as at least one metric value is
       available.
       +optional
       
      optional int32 minReplicas = 2;
    • hasMaxReplicas

      public boolean hasMaxReplicas()
       maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
       It cannot be less that minReplicas.
       
      optional int32 maxReplicas = 3;
      Specified by:
      hasMaxReplicas in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getMaxReplicas

      public int getMaxReplicas()
       maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
       It cannot be less that minReplicas.
       
      optional int32 maxReplicas = 3;
      Specified by:
      getMaxReplicas in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • setMaxReplicas

      public V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder setMaxReplicas(int value)
       maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
       It cannot be less that minReplicas.
       
      optional int32 maxReplicas = 3;
    • clearMaxReplicas

       maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
       It cannot be less that minReplicas.
       
      optional int32 maxReplicas = 3;
    • getMetricsList

      public List<V2beta1Autoscaling.MetricSpec> getMetricsList()
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
      Specified by:
      getMetricsList in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getMetricsCount

      public int getMetricsCount()
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
      Specified by:
      getMetricsCount in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getMetrics

      public V2beta1Autoscaling.MetricSpec getMetrics(int index)
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
      Specified by:
      getMetrics in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • setMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • setMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addAllMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • clearMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • removeMetrics

       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • getMetricsBuilder

      public V2beta1Autoscaling.MetricSpec.Builder getMetricsBuilder(int index)
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • getMetricsOrBuilder

      public V2beta1Autoscaling.MetricSpecOrBuilder getMetricsOrBuilder(int index)
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
      Specified by:
      getMetricsOrBuilder in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • getMetricsOrBuilderList

      public List<? extends V2beta1Autoscaling.MetricSpecOrBuilder> getMetricsOrBuilderList()
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
      Specified by:
      getMetricsOrBuilderList in interface V2beta1Autoscaling.HorizontalPodAutoscalerSpecOrBuilder
    • addMetricsBuilder

      public V2beta1Autoscaling.MetricSpec.Builder addMetricsBuilder()
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • addMetricsBuilder

      public V2beta1Autoscaling.MetricSpec.Builder addMetricsBuilder(int index)
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • getMetricsBuilderList

      public List<V2beta1Autoscaling.MetricSpec.Builder> getMetricsBuilderList()
       metrics contains the specifications for which to use to calculate the
       desired replica count (the maximum replica count across all metrics will
       be used).  The desired replica count is calculated multiplying the
       ratio between the target value and the current value by the current
       number of pods.  Ergo, metrics used must decrease as the pod count is
       increased, and vice-versa.  See the individual metric source types for
       more information about how each type of metric must respond.
       +optional
       
      repeated .k8s.io.api.autoscaling.v2beta1.MetricSpec metrics = 4;
    • setUnknownFields

      public final V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>
    • mergeUnknownFields

      public final V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<V2beta1Autoscaling.HorizontalPodAutoscalerSpec.Builder>