Send feedback
Class ResourceRequirements.Builder (0.22.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.22.0 keyboard_arrow_down
public static final class ResourceRequirements . Builder extends GeneratedMessageV3 . Builder<ResourceRequirements . Builder > implements ResourceRequirementsOrBuilder
ResourceRequirements describes the compute resource requirements.
Protobuf type google.cloud.run.v2.ResourceRequirements
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ResourceRequirements . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
public ResourceRequirements build ()
buildPartial()
public ResourceRequirements buildPartial ()
clear()
public ResourceRequirements . Builder clear ()
Overrides
clearCpuIdle()
public ResourceRequirements . Builder clearCpuIdle ()
Determines whether CPU should be throttled or not outside of requests.
bool cpu_idle = 2;
clearField(Descriptors.FieldDescriptor field)
public ResourceRequirements . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearLimits()
public ResourceRequirements . Builder clearLimits ()
clearOneof(Descriptors.OneofDescriptor oneof)
public ResourceRequirements . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clearStartupCpuBoost()
public ResourceRequirements . Builder clearStartupCpuBoost ()
Determines whether CPU should be boosted on startup of a new container
instance above the requested CPU threshold, this can help reduce cold-start
latency.
bool startup_cpu_boost = 3;
clone()
public ResourceRequirements . Builder clone ()
Overrides
containsLimits(String key)
public boolean containsLimits ( String key )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
Parameter Name Description key
String
getCpuIdle()
public boolean getCpuIdle ()
Determines whether CPU should be throttled or not outside of requests.
bool cpu_idle = 2;
Returns Type Description boolean
The cpuIdle.
getDefaultInstanceForType()
public ResourceRequirements getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getLimits()
public Map<String , String > getLimits ()
getLimitsCount()
public int getLimitsCount ()
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
Returns Type Description int
getLimitsMap()
public Map<String , String > getLimitsMap ()
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
getLimitsOrDefault(String key, String defaultValue)
public String getLimitsOrDefault ( String key , String defaultValue )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
getLimitsOrThrow(String key)
public String getLimitsOrThrow ( String key )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
Parameter Name Description key
String
getMutableLimits()
public Map<String , String > getMutableLimits ()
Use alternate mutation accessors instead.
getStartupCpuBoost()
public boolean getStartupCpuBoost ()
Determines whether CPU should be boosted on startup of a new container
instance above the requested CPU threshold, this can help reduce cold-start
latency.
bool startup_cpu_boost = 3;
Returns Type Description boolean
The startupCpuBoost.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField ( int number )
Parameter Name Description number
int
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField ( int number )
Parameter Name Description number
int
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(ResourceRequirements other)
public ResourceRequirements . Builder mergeFrom ( ResourceRequirements other )
public ResourceRequirements . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public ResourceRequirements . Builder mergeFrom ( Message other )
Parameter Name Description other
Message
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ResourceRequirements . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
putAllLimits(Map<String,String> values)
public ResourceRequirements . Builder putAllLimits ( Map<String , String > values )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
putLimits(String key, String value)
public ResourceRequirements . Builder putLimits ( String key , String value )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
removeLimits(String key)
public ResourceRequirements . Builder removeLimits ( String key )
Only ´memory´ and 'cpu' are supported.
<p>Notes:
map<string, string> limits = 1;
Parameter Name Description key
String
setCpuIdle(boolean value)
public ResourceRequirements . Builder setCpuIdle ( boolean value )
Determines whether CPU should be throttled or not outside of requests.
bool cpu_idle = 2;
Parameter Name Description value
boolean
The cpuIdle to set.
setField(Descriptors.FieldDescriptor field, Object value)
public ResourceRequirements . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ResourceRequirements . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setStartupCpuBoost(boolean value)
public ResourceRequirements . Builder setStartupCpuBoost ( boolean value )
Determines whether CPU should be boosted on startup of a new container
instance above the requested CPU threshold, this can help reduce cold-start
latency.
bool startup_cpu_boost = 3;
Parameter Name Description value
boolean
The startupCpuBoost to set.
setUnknownFields(UnknownFieldSet unknownFields)
public final ResourceRequirements . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]