# Interface RuntimeOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.notebooks.v1.RuntimeOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.notebooks.v1.RuntimeOrBuilder)

    public interface RuntimeOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Optional. The labels to associate with this Managed Notebook or Runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

`map<string, string> labels = 23;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getAccessConfig()

    public abstract RuntimeAccessConfig getAccessConfig()

The config settings for accessing runtime.

`.google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeAccessConfig` | The accessConfig. |

### getAccessConfigOrBuilder()

    public abstract RuntimeAccessConfigOrBuilder getAccessConfigOrBuilder()

The config settings for accessing runtime.

`.google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. Runtime creation time.

`.google.protobuf.Timestamp create_time = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Runtime creation time.

`.google.protobuf.Timestamp create_time = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getHealthState()

    public abstract Runtime.HealthState getHealthState()

Output only. Runtime health_state.

`.google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.Runtime.HealthState` | The healthState. |

### getHealthStateValue()

    public abstract int getHealthStateValue()

Output only. Runtime health_state.

`.google.events.cloud.notebooks.v1.Runtime.HealthState health_state = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for healthState. |

### getLabels()

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeOrBuilder#com_google_events_cloud_notebooks_v1_RuntimeOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Optional. The labels to associate with this Managed Notebook or Runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

`map<string, string> labels = 23;`

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

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. The labels to associate with this Managed Notebook or Runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

`map<string, string> labels = 23;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels to associate with this Managed Notebook or Runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

`map<string, string> labels = 23;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Optional. The labels to associate with this Managed Notebook or Runtime.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a cluster.

`map<string, string> labels = 23;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getMetrics()

    public abstract RuntimeMetrics getMetrics()

Output only. Contains Runtime daemon metrics such as Service status and
JupyterLab stats.

`.google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeMetrics` | The metrics. |

### getMetricsOrBuilder()

    public abstract RuntimeMetricsOrBuilder getMetricsOrBuilder()

Output only. Contains Runtime daemon metrics such as Service status and
JupyterLab stats.

`.google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeMetricsOrBuilder` |   |

### getName()

    public abstract String getName()

Output only. The resource name of the runtime.
Format:
`projects/{project}/locations/{location}/runtimes/{runtimeId}`

`string name = 1;`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The resource name of the runtime.
Format:
`projects/{project}/locations/{location}/runtimes/{runtimeId}`

`string name = 1;`

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

### getRuntimeTypeCase()

    public abstract Runtime.RuntimeTypeCase getRuntimeTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.Runtime.RuntimeTypeCase` |   |

### getSoftwareConfig()

    public abstract RuntimeSoftwareConfig getSoftwareConfig()

The config settings for software inside the runtime.

`.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig` | The softwareConfig. |

### getSoftwareConfigOrBuilder()

    public abstract RuntimeSoftwareConfigOrBuilder getSoftwareConfigOrBuilder()

The config settings for software inside the runtime.

`.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder` |   |

### getState()

    public abstract Runtime.State getState()

Output only. Runtime state.

`.google.events.cloud.notebooks.v1.Runtime.State state = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.Runtime.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. Runtime state.

`.google.events.cloud.notebooks.v1.Runtime.State state = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. Runtime update time.

`.google.protobuf.Timestamp update_time = 21;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Runtime update time.

`.google.protobuf.Timestamp update_time = 21;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getVirtualMachine()

    public abstract VirtualMachine getVirtualMachine()

Use a Compute Engine VM image to start the managed notebook instance.

`.google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.VirtualMachine` | The virtualMachine. |

### getVirtualMachineOrBuilder()

    public abstract VirtualMachineOrBuilder getVirtualMachineOrBuilder()

Use a Compute Engine VM image to start the managed notebook instance.

`.google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.notebooks.v1.VirtualMachineOrBuilder` |   |

### hasAccessConfig()

    public abstract boolean hasAccessConfig()

The config settings for accessing runtime.

`.google.events.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the accessConfig field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. Runtime creation time.

`.google.protobuf.Timestamp create_time = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasMetrics()

    public abstract boolean hasMetrics()

Output only. Contains Runtime daemon metrics such as Service status and
JupyterLab stats.

`.google.events.cloud.notebooks.v1.RuntimeMetrics metrics = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the metrics field is set. |

### hasSoftwareConfig()

    public abstract boolean hasSoftwareConfig()

The config settings for software inside the runtime.

`.google.events.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the softwareConfig field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. Runtime update time.

`.google.protobuf.Timestamp update_time = 21;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |

### hasVirtualMachine()

    public abstract boolean hasVirtualMachine()

Use a Compute Engine VM image to start the managed notebook instance.

`.google.events.cloud.notebooks.v1.VirtualMachine virtual_machine = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the virtualMachine field is set. |