Class ResourceSpecification

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.visionai.v1.ResourceSpecification
All Implemented Interfaces:
ResourceSpecificationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ResourceSpecification extends com.google.protobuf.GeneratedMessage implements ResourceSpecificationOrBuilder
 ResourceSpec collects a set of resources that can
 be used to specify requests and requirements.

 Note: Highly experimental as this can be runtime dependent.
 Can use the "extras" field to experiment first before trying
 to abstract it.
 
Protobuf type google.cloud.visionai.v1.ResourceSpecification
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    ResourceSpec collects a set of resources that can be used to specify requests and requirements.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    CPU specification.
    com.google.protobuf.ByteString
    CPU specification.
    CPU limit.
    com.google.protobuf.ByteString
    CPU limit.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    int
    Number of gpus.
    int
    The maximum latency that this operator may use to process an element.
    Memory specification (in bytes).
    com.google.protobuf.ByteString
    Memory specification (in bytes).
    Memory usage limits.
    com.google.protobuf.ByteString
    Memory usage limits.
    com.google.protobuf.Parser<ResourceSpecification>
     
    int
     
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<ResourceSpecification>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

  • Method Details

    • getDescriptor

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

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

      public String getCpu()
       CPU specification.
      
       Examples:
       "100m", "0.5", "1", "2", ... correspond to
       0.1, half, 1, or 2 cpus.
      
       Leave empty to let the system decide.
      
       Note that this does *not* determine the cpu vender/make,
       or its underlying clock speed and specific SIMD features.
       It is only the amount time it requires in timeslicing.
       
      string cpu = 1;
      Specified by:
      getCpu in interface ResourceSpecificationOrBuilder
      Returns:
      The cpu.
    • getCpuBytes

      public com.google.protobuf.ByteString getCpuBytes()
       CPU specification.
      
       Examples:
       "100m", "0.5", "1", "2", ... correspond to
       0.1, half, 1, or 2 cpus.
      
       Leave empty to let the system decide.
      
       Note that this does *not* determine the cpu vender/make,
       or its underlying clock speed and specific SIMD features.
       It is only the amount time it requires in timeslicing.
       
      string cpu = 1;
      Specified by:
      getCpuBytes in interface ResourceSpecificationOrBuilder
      Returns:
      The bytes for cpu.
    • getCpuLimits

      public String getCpuLimits()
       CPU limit.
      
       Examples:
       "100m", "0.5", "1", "2", ... correspond to
       0.1, half, 1, or 2 cpus.
      
       Leave empty to indicate no limit.
       
      string cpu_limits = 5;
      Specified by:
      getCpuLimits in interface ResourceSpecificationOrBuilder
      Returns:
      The cpuLimits.
    • getCpuLimitsBytes

      public com.google.protobuf.ByteString getCpuLimitsBytes()
       CPU limit.
      
       Examples:
       "100m", "0.5", "1", "2", ... correspond to
       0.1, half, 1, or 2 cpus.
      
       Leave empty to indicate no limit.
       
      string cpu_limits = 5;
      Specified by:
      getCpuLimitsBytes in interface ResourceSpecificationOrBuilder
      Returns:
      The bytes for cpuLimits.
    • getMemory

      public String getMemory()
       Memory specification (in bytes).
      
       Examples:
       "128974848", "129e6", "129M", "123Mi", ... correspond to
       128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
      
       Leave empty to let the system decide.
       
      string memory = 2;
      Specified by:
      getMemory in interface ResourceSpecificationOrBuilder
      Returns:
      The memory.
    • getMemoryBytes

      public com.google.protobuf.ByteString getMemoryBytes()
       Memory specification (in bytes).
      
       Examples:
       "128974848", "129e6", "129M", "123Mi", ... correspond to
       128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
      
       Leave empty to let the system decide.
       
      string memory = 2;
      Specified by:
      getMemoryBytes in interface ResourceSpecificationOrBuilder
      Returns:
      The bytes for memory.
    • getMemoryLimits

      public String getMemoryLimits()
       Memory usage limits.
      
       Examples:
       "128974848", "129e6", "129M", "123Mi", ... correspond to
       128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
      
       Leave empty to indicate no limit.
       
      string memory_limits = 6;
      Specified by:
      getMemoryLimits in interface ResourceSpecificationOrBuilder
      Returns:
      The memoryLimits.
    • getMemoryLimitsBytes

      public com.google.protobuf.ByteString getMemoryLimitsBytes()
       Memory usage limits.
      
       Examples:
       "128974848", "129e6", "129M", "123Mi", ... correspond to
       128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
      
       Leave empty to indicate no limit.
       
      string memory_limits = 6;
      Specified by:
      getMemoryLimitsBytes in interface ResourceSpecificationOrBuilder
      Returns:
      The bytes for memoryLimits.
    • getGpus

      public int getGpus()
       Number of gpus.
       
      int32 gpus = 3;
      Specified by:
      getGpus in interface ResourceSpecificationOrBuilder
      Returns:
      The gpus.
    • getLatencyBudgetMs

      public int getLatencyBudgetMs()
       The maximum latency that this operator may use to process an element.
      
       If non positive, then a system default will be used.
       Operator developers should arrange for the system compute resources to be
       aligned with this latency budget; e.g. if you want a ML model to produce
       results within 500ms, then you should make sure you request enough
       cpu/gpu/memory to achieve that.
       
      int32 latency_budget_ms = 4;
      Specified by:
      getLatencyBudgetMs in interface ResourceSpecificationOrBuilder
      Returns:
      The latencyBudgetMs.
    • 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 ResourceSpecification parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static ResourceSpecification.Builder newBuilder()
    • newBuilder

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

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

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

      public static ResourceSpecification getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<ResourceSpecification> 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 ResourceSpecification getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder