- 0.83.0 (latest)
- 0.82.0
- 0.80.0
- 0.78.0
- 0.76.0
- 0.75.0
- 0.74.0
- 0.73.0
- 0.72.0
- 0.70.0
- 0.68.0
- 0.67.0
- 0.64.0
- 0.63.0
- 0.62.0
- 0.60.0
- 0.59.0
- 0.58.0
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.5
- 0.2.1
- 0.1.2
public static final class ResourceRequirements.Builder extends GeneratedMessage.Builder<ResourceRequirements.Builder> implements ResourceRequirementsOrBuilderResourceRequirements describes the compute resource requirements.
Protobuf type google.cloud.run.v2.ResourceRequirements
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ResourceRequirements.BuilderImplements
ResourceRequirementsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ResourceRequirements build()| Returns | |
|---|---|
| Type | Description |
ResourceRequirements |
|
buildPartial()
public ResourceRequirements buildPartial()| Returns | |
|---|---|
| Type | Description |
ResourceRequirements |
|
clear()
public ResourceRequirements.Builder clear()| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
This builder for chaining. |
clearLimits()
public ResourceRequirements.Builder clearLimits()| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
This builder for chaining. |
containsLimits(String key)
public boolean containsLimits(String key) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
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()| Returns | |
|---|---|
| Type | Description |
ResourceRequirements |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getLimits() (deprecated)
public Map<String,String> getLimits()Use #getLimitsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getLimitsCount()
public int getLimitsCount() Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Returns | |
|---|---|
| Type | Description |
int |
|
getLimitsMap()
public Map<String,String> getLimitsMap() Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getLimitsOrDefault(String key, String defaultValue)
public String getLimitsOrDefault(String key, String defaultValue) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getLimitsOrThrow(String key)
public String getLimitsOrThrow(String key) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getMutableLimits() (deprecated)
public Map<String,String> getMutableLimits()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
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 GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ResourceRequirements other)
public ResourceRequirements.Builder mergeFrom(ResourceRequirements other)| Parameter | |
|---|---|
| Name | Description |
other |
ResourceRequirements |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ResourceRequirements.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ResourceRequirements.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
putAllLimits(Map<String,String> values)
public ResourceRequirements.Builder putAllLimits(Map<String,String> values) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,String> |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
putLimits(String key, String value)
public ResourceRequirements.Builder putLimits(String key, String value) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
String |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
removeLimits(String key)
public ResourceRequirements.Builder removeLimits(String key) Only memory, cpu and nvidia.com/gpu keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- The only supported 'nvidia.com/gpu' value is '1'.
map<string, string> limits = 1;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
|
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 |
booleanThe cpuIdle to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
This builder for chaining. |
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 |
booleanThe startupCpuBoost to set. |
| Returns | |
|---|---|
| Type | Description |
ResourceRequirements.Builder |
This builder for chaining. |