Package com.google.cloud.visionai.v1
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 ClassesModifier and TypeClassDescriptionstatic final classResourceSpec 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.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCpu()CPU specification.com.google.protobuf.ByteStringCPU specification.CPU limit.com.google.protobuf.ByteStringCPU limit.static ResourceSpecificationstatic final com.google.protobuf.Descriptors.DescriptorintgetGpus()Number of gpus.intThe maximum latency that this operator may use to process an element.Memory specification (in bytes).com.google.protobuf.ByteStringMemory specification (in bytes).Memory usage limits.com.google.protobuf.ByteStringMemory usage limits.com.google.protobuf.Parser<ResourceSpecification>intinthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(ResourceSpecification prototype) protected ResourceSpecification.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ResourceSpecificationparseDelimitedFrom(InputStream input) static ResourceSpecificationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceSpecificationparseFrom(byte[] data) static ResourceSpecificationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceSpecificationparseFrom(com.google.protobuf.ByteString data) static ResourceSpecificationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceSpecificationparseFrom(com.google.protobuf.CodedInputStream input) static ResourceSpecificationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceSpecificationparseFrom(InputStream input) static ResourceSpecificationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceSpecificationparseFrom(ByteBuffer data) static ResourceSpecificationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<ResourceSpecification>parser()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
CPU_FIELD_NUMBER
public static final int CPU_FIELD_NUMBER- See Also:
-
CPU_LIMITS_FIELD_NUMBER
public static final int CPU_LIMITS_FIELD_NUMBER- See Also:
-
MEMORY_FIELD_NUMBER
public static final int MEMORY_FIELD_NUMBER- See Also:
-
MEMORY_LIMITS_FIELD_NUMBER
public static final int MEMORY_LIMITS_FIELD_NUMBER- See Also:
-
GPUS_FIELD_NUMBER
public static final int GPUS_FIELD_NUMBER- See Also:
-
LATENCY_BUDGET_MS_FIELD_NUMBER
public static final int LATENCY_BUDGET_MS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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:
getCpuin interfaceResourceSpecificationOrBuilder- 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:
getCpuBytesin interfaceResourceSpecificationOrBuilder- Returns:
- The bytes for cpu.
-
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:
getCpuLimitsin interfaceResourceSpecificationOrBuilder- 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:
getCpuLimitsBytesin interfaceResourceSpecificationOrBuilder- Returns:
- The bytes for cpuLimits.
-
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:
getMemoryin interfaceResourceSpecificationOrBuilder- 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:
getMemoryBytesin interfaceResourceSpecificationOrBuilder- Returns:
- The bytes for memory.
-
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:
getMemoryLimitsin interfaceResourceSpecificationOrBuilder- 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:
getMemoryLimitsBytesin interfaceResourceSpecificationOrBuilder- Returns:
- The bytes for memoryLimits.
-
getGpus
public int getGpus()Number of gpus.
int32 gpus = 3;- Specified by:
getGpusin interfaceResourceSpecificationOrBuilder- 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:
getLatencyBudgetMsin interfaceResourceSpecificationOrBuilder- Returns:
- The latencyBudgetMs.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- Throws:
IOException
-
parseFrom
public static ResourceSpecification parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ResourceSpecification.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-