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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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 is only allocated during requests (true by default).
However, if ResourceRequirements is set, the caller must explicitly
set this field to true to preserve the default behavior.
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
keys in the map are supported.
<p>Notes:
map<string, string> limits = 1;
Parameter |
---|
Name | Description |
key | String
|
getCpuIdle()
public boolean getCpuIdle()
Determines whether CPU is only allocated during requests (true by default).
However, if ResourceRequirements is set, the caller must explicitly
set this field to true to preserve the default behavior.
bool cpu_idle = 2;
Returns |
---|
Type | Description |
boolean | The cpuIdle.
|
getDefaultInstanceForType()
public ResourceRequirements getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getLimits() (deprecated)
public Map<String,String> getLimits()
getLimitsCount()
public int getLimitsCount()
Only memory
and cpu
keys in the map are supported.
<p>Notes:
map<string, string> limits = 1;
Returns |
---|
Type | Description |
int | |
getLimitsMap()
public Map<String,String> getLimitsMap()
Only memory
and cpu
keys in the map 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
keys in the map are supported.
<p>Notes:
map<string, string> limits = 1;
getLimitsOrThrow(String key)
public String getLimitsOrThrow(String key)
Only memory
and cpu
keys in the map are supported.
<p>Notes:
map<string, string> limits = 1;
Parameter |
---|
Name | Description |
key | String
|
getMutableLimits() (deprecated)
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
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
---|
Name | Description |
number | int
|
Returns |
---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor | |
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
---|
Name | Description |
number | int
|
Returns |
---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor | |
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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
keys in the map 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
keys in the map are supported.
<p>Notes:
map<string, string> limits = 1;
removeLimits(String key)
public ResourceRequirements.Builder removeLimits(String key)
Only memory
and cpu
keys in the map 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 is only allocated during requests (true by default).
However, if ResourceRequirements is set, the caller must explicitly
set this field to true to preserve the default behavior.
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