# Interface ResourceSpecificationOrBuilder (0.50.0)

0.50.0 (latest) 0.48.0 0.45.0 0.44.0 0.42.0 0.40.0 0.39.0 0.37.0 0.35.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.27.0 0.25.0 0.24.0 0.21.0 0.20.0 0.19.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface ResourceSpecificationOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCpu()

    public abstract String getCpu()

CPU specification.

Examples:
"100m", "0.5", "1", "2", ... correspond to
0.1, half, 1, or 2 cpus.

Leave empty to let the system decide.

Note that this does *not* determine the cpu vender/make,
or its underlying clock speed and specific SIMD features.
It is only the amount time it requires in timeslicing.

`string cpu = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The cpu. |

### getCpuBytes()

    public abstract ByteString getCpuBytes()

CPU specification.

Examples:
"100m", "0.5", "1", "2", ... correspond to
0.1, half, 1, or 2 cpus.

Leave empty to let the system decide.

Note that this does *not* determine the cpu vender/make,
or its underlying clock speed and specific SIMD features.
It is only the amount time it requires in timeslicing.

`string cpu = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for cpu. |

### getCpuLimits()

    public abstract String getCpuLimits()

CPU limit.

Examples:
"100m", "0.5", "1", "2", ... correspond to
0.1, half, 1, or 2 cpus.

Leave empty to indicate no limit.

`string cpu_limits = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The cpuLimits. |

### getCpuLimitsBytes()

    public abstract ByteString getCpuLimitsBytes()

CPU limit.

Examples:
"100m", "0.5", "1", "2", ... correspond to
0.1, half, 1, or 2 cpus.

Leave empty to indicate no limit.

`string cpu_limits = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for cpuLimits. |

### getGpus()

    public abstract int getGpus()

Number of gpus.

`int32 gpus = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The gpus. |

### getLatencyBudgetMs()

    public abstract int getLatencyBudgetMs()

The maximum latency that this operator may use to process an element.

If non positive, then a system default will be used.
Operator developers should arrange for the system compute resources to be
aligned with this latency budget; e.g. if you want a ML model to produce
results within 500ms, then you should make sure you request enough
cpu/gpu/memory to achieve that.

`int32 latency_budget_ms = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The latencyBudgetMs. |

### getMemory()

    public abstract String getMemory()

Memory specification (in bytes).

Examples:
"128974848", "129e6", "129M", "123Mi", ... correspond to
128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to let the system decide.

`string memory = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The memory. |

### getMemoryBytes()

    public abstract ByteString getMemoryBytes()

Memory specification (in bytes).

Examples:
"128974848", "129e6", "129M", "123Mi", ... correspond to
128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to let the system decide.

`string memory = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for memory. |

### getMemoryLimits()

    public abstract String getMemoryLimits()

Memory usage limits.

Examples:
"128974848", "129e6", "129M", "123Mi", ... correspond to
128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to indicate no limit.

`string memory_limits = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The memoryLimits. |

### getMemoryLimitsBytes()

    public abstract ByteString getMemoryLimitsBytes()

Memory usage limits.

Examples:
"128974848", "129e6", "129M", "123Mi", ... correspond to
128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to indicate no limit.

`string memory_limits = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for memoryLimits. |