Class ResourceRequirements.Builder (0.3.5)

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

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()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ResourceRequirements.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

build()

public ResourceRequirements build()
Returns
TypeDescription
ResourceRequirements

buildPartial()

public ResourceRequirements buildPartial()
Returns
TypeDescription
ResourceRequirements

clear()

public ResourceRequirements.Builder clear()
Returns Overrides

clearCpuIdle()

public ResourceRequirements.Builder clearCpuIdle()

Determines whether CPU should be throttled or not outside of requests.

bool cpu_idle = 2;

Returns
TypeDescription
ResourceRequirements.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ResourceRequirements.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns Overrides

clearLimits()

public ResourceRequirements.Builder clearLimits()
Returns

clearOneof(Descriptors.OneofDescriptor oneof)

public ResourceRequirements.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns Overrides

clone()

public ResourceRequirements.Builder clone()
Returns Overrides

containsLimits(String key)

public boolean containsLimits(String key)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCpuIdle()

public boolean getCpuIdle()

Determines whether CPU should be throttled or not outside of requests.

bool cpu_idle = 2;

Returns
TypeDescription
boolean

The cpuIdle.

getDefaultInstanceForType()

public ResourceRequirements getDefaultInstanceForType()
Returns
TypeDescription
ResourceRequirements

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLimits()

public Map<String,String> getLimits()

Use #getLimitsMap() instead.

Returns
TypeDescription
Map<String,String>

getLimitsCount()

public int getLimitsCount()

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Returns
TypeDescription
int

getLimitsMap()

public Map<String,String> getLimitsMap()

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Returns
TypeDescription
Map<String,String>

getLimitsOrDefault(String key, String defaultValue)

public String getLimitsOrDefault(String key, String defaultValue)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLimitsOrThrow(String key)

public String getLimitsOrThrow(String key)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLimits()

public Map<String,String> getMutableLimits()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ResourceRequirements other)

public ResourceRequirements.Builder mergeFrom(ResourceRequirements other)
Parameter
NameDescription
otherResourceRequirements
Returns

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ResourceRequirements.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ResourceRequirements.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourceRequirements.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides

putAllLimits(Map<String,String> values)

public ResourceRequirements.Builder putAllLimits(Map<String,String> values)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameter
NameDescription
valuesMap<String,String>
Returns

putLimits(String key, String value)

public ResourceRequirements.Builder putLimits(String key, String value)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameters
NameDescription
keyString
valueString
Returns

removeLimits(String key)

public ResourceRequirements.Builder removeLimits(String key)

Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

map<string, string> limits = 1;

Parameter
NameDescription
keyString
Returns

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
NameDescription
valueboolean

The cpuIdle to set.

Returns
TypeDescription
ResourceRequirements.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ResourceRequirements.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ResourceRequirements.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ResourceRequirements.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides