Class AutoscalingMetricSpec

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1beta1.AutoscalingMetricSpec
All Implemented Interfaces:
AutoscalingMetricSpecOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class AutoscalingMetricSpec extends com.google.protobuf.GeneratedMessage implements AutoscalingMetricSpecOrBuilder
 The metric specification that defines the target resource utilization
 (CPU utilization, accelerator's duty cycle, and so on) for calculating the
 desired replica count.
 
Protobuf type google.cloud.aiplatform.v1beta1.AutoscalingMetricSpec
See Also:
  • Field Details

    • METRIC_NAME_FIELD_NUMBER

      public static final int METRIC_NAME_FIELD_NUMBER
      See Also:
    • TARGET_FIELD_NUMBER

      public static final int TARGET_FIELD_NUMBER
      See Also:
    • MONITORED_RESOURCE_LABELS_FIELD_NUMBER

      public static final int MONITORED_RESOURCE_LABELS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getMetricName

      public String getMetricName()
       Required. The resource metric name.
       Supported metrics:
      
       * For Online Prediction:
       * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
       * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
       * `aiplatform.googleapis.com/prediction/online/request_count`
       
      string metric_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricName in interface AutoscalingMetricSpecOrBuilder
      Returns:
      The metricName.
    • getMetricNameBytes

      public com.google.protobuf.ByteString getMetricNameBytes()
       Required. The resource metric name.
       Supported metrics:
      
       * For Online Prediction:
       * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
       * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
       * `aiplatform.googleapis.com/prediction/online/request_count`
       
      string metric_name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricNameBytes in interface AutoscalingMetricSpecOrBuilder
      Returns:
      The bytes for metricName.
    • getTarget

      public int getTarget()
       The target resource utilization in percentage (1% - 100%) for the given
       metric; once the real usage deviates from the target by a certain
       percentage, the machine replicas change. The default value is 60
       (representing 60%) if not provided.
       
      int32 target = 2;
      Specified by:
      getTarget in interface AutoscalingMetricSpecOrBuilder
      Returns:
      The target.
    • getMonitoredResourceLabelsCount

      public int getMonitoredResourceLabelsCount()
      Description copied from interface: AutoscalingMetricSpecOrBuilder
       Optional. The Cloud Monitoring monitored resource labels as key value pairs
       used for metrics filtering. See Cloud Monitoring Labels
       https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
       
      map<string, string> monitored_resource_labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMonitoredResourceLabelsCount in interface AutoscalingMetricSpecOrBuilder
    • containsMonitoredResourceLabels

      public boolean containsMonitoredResourceLabels(String key)
       Optional. The Cloud Monitoring monitored resource labels as key value pairs
       used for metrics filtering. See Cloud Monitoring Labels
       https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
       
      map<string, string> monitored_resource_labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsMonitoredResourceLabels in interface AutoscalingMetricSpecOrBuilder
    • getMonitoredResourceLabels

      @Deprecated public Map<String,String> getMonitoredResourceLabels()
      Deprecated.
      Specified by:
      getMonitoredResourceLabels in interface AutoscalingMetricSpecOrBuilder
    • getMonitoredResourceLabelsMap

      public Map<String,String> getMonitoredResourceLabelsMap()
       Optional. The Cloud Monitoring monitored resource labels as key value pairs
       used for metrics filtering. See Cloud Monitoring Labels
       https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
       
      map<string, string> monitored_resource_labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMonitoredResourceLabelsMap in interface AutoscalingMetricSpecOrBuilder
    • getMonitoredResourceLabelsOrDefault

      public String getMonitoredResourceLabelsOrDefault(String key, String defaultValue)
       Optional. The Cloud Monitoring monitored resource labels as key value pairs
       used for metrics filtering. See Cloud Monitoring Labels
       https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
       
      map<string, string> monitored_resource_labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMonitoredResourceLabelsOrDefault in interface AutoscalingMetricSpecOrBuilder
    • getMonitoredResourceLabelsOrThrow

      public String getMonitoredResourceLabelsOrThrow(String key)
       Optional. The Cloud Monitoring monitored resource labels as key value pairs
       used for metrics filtering. See Cloud Monitoring Labels
       https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
       
      map<string, string> monitored_resource_labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMonitoredResourceLabelsOrThrow in interface AutoscalingMetricSpecOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AutoscalingMetricSpec parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AutoscalingMetricSpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutoscalingMetricSpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AutoscalingMetricSpec.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AutoscalingMetricSpec.Builder newBuilder()
    • newBuilder

      public static AutoscalingMetricSpec.Builder newBuilder(AutoscalingMetricSpec prototype)
    • toBuilder

      public AutoscalingMetricSpec.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AutoscalingMetricSpec.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AutoscalingMetricSpec getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AutoscalingMetricSpec> parser()
    • getParserForType

      public com.google.protobuf.Parser<AutoscalingMetricSpec> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AutoscalingMetricSpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder