Class ResourceRequirements (0.20.0)

public final class ResourceRequirements extends GeneratedMessageV3 implements ResourceRequirementsOrBuilder

ResourceRequirements describes the compute resource requirements.

Protobuf type google.cloud.run.v2.ResourceRequirements

Static Fields

CPU_IDLE_FIELD_NUMBER

public static final int CPU_IDLE_FIELD_NUMBER
Field Value
TypeDescription
int

LIMITS_FIELD_NUMBER

public static final int LIMITS_FIELD_NUMBER
Field Value
TypeDescription
int

STARTUP_CPU_BOOST_FIELD_NUMBER

public static final int STARTUP_CPU_BOOST_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ResourceRequirements getDefaultInstance()
Returns
TypeDescription
ResourceRequirements

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ResourceRequirements.Builder newBuilder()
Returns
TypeDescription
ResourceRequirements.Builder

newBuilder(ResourceRequirements prototype)

public static ResourceRequirements.Builder newBuilder(ResourceRequirements prototype)
Parameter
NameDescription
prototypeResourceRequirements
Returns
TypeDescription
ResourceRequirements.Builder

parseDelimitedFrom(InputStream input)

public static ResourceRequirements parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ResourceRequirements parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResourceRequirements parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResourceRequirements parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ResourceRequirements parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ResourceRequirements parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResourceRequirements parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceRequirements
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ResourceRequirements> parser()
Returns
TypeDescription
Parser<ResourceRequirements>

Methods

containsLimits(String key)

public boolean containsLimits(String key)

Only ´memory´ and 'cpu' are supported.

<p>Notes:

map<string, string> limits = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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

getLimits()

public Map<String,String> getLimits()

Use #getLimitsMap() instead.

Returns
TypeDescription
Map<String,String>

getLimitsCount()

public int getLimitsCount()

Only ´memory´ and 'cpu' are supported.

<p>Notes:

map<string, string> limits = 1;

Returns
TypeDescription
int

getLimitsMap()

public Map<String,String> getLimitsMap()

Only ´memory´ and 'cpu' are supported.

<p>Notes:

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.

<p>Notes:

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.

<p>Notes:

map<string, string> limits = 1;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getParserForType()

public Parser<ResourceRequirements> getParserForType()
Returns
TypeDescription
Parser<ResourceRequirements>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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
TypeDescription
boolean

The startupCpuBoost.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ResourceRequirements.Builder newBuilderForType()
Returns
TypeDescription
ResourceRequirements.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResourceRequirements.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ResourceRequirements.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ResourceRequirements.Builder toBuilder()
Returns
TypeDescription
ResourceRequirements.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException