# Interface Runnable.ScriptOrBuilder (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.batch.v1.Runnable.ScriptOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.batch.v1.Runnable.ScriptOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.batch.v1.Runnable.ScriptOrBuilder)

    public static interface Runnable.ScriptOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getCommandCase()

    public abstract Runnable.Script.CommandCase getCommandCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.Runnable.Script.CommandCase` |   |

### getPath()

    public abstract String getPath()

Script file path on the host VM.
To specify an interpreter, please add a `#!<interpreter>`(also known as
[shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
first line of the file.(For example, to execute the script using bash,
`#!/bin/bash` should be the first line of the file. To execute the
script using`Python3`, `#!/usr/bin/env python3` should be the first
line of the file.) Otherwise, the file will by default be excuted by
`/bin/sh`.

`string path = 1;`

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

### getPathBytes()

    public abstract ByteString getPathBytes()

Script file path on the host VM.
To specify an interpreter, please add a `#!<interpreter>`(also known as
[shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
first line of the file.(For example, to execute the script using bash,
`#!/bin/bash` should be the first line of the file. To execute the
script using`Python3`, `#!/usr/bin/env python3` should be the first
line of the file.) Otherwise, the file will by default be excuted by
`/bin/sh`.

`string path = 1;`

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

### getText()

    public abstract String getText()

Shell script text.
To specify an interpreter, please add a `#!<interpreter>\n` at the
beginning of the text.(For example, to execute the script using bash,
`#!/bin/bash\n` should be added. To execute the script using`Python3`,
`#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
by default be excuted by `/bin/sh`.

`string text = 2;`

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

### getTextBytes()

    public abstract ByteString getTextBytes()

Shell script text.
To specify an interpreter, please add a `#!<interpreter>\n` at the
beginning of the text.(For example, to execute the script using bash,
`#!/bin/bash\n` should be added. To execute the script using`Python3`,
`#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
by default be excuted by `/bin/sh`.

`string text = 2;`

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

### hasPath()

    public abstract boolean hasPath()

Script file path on the host VM.
To specify an interpreter, please add a `#!<interpreter>`(also known as
[shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
first line of the file.(For example, to execute the script using bash,
`#!/bin/bash` should be the first line of the file. To execute the
script using`Python3`, `#!/usr/bin/env python3` should be the first
line of the file.) Otherwise, the file will by default be excuted by
`/bin/sh`.

`string path = 1;`

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

### hasText()

    public abstract boolean hasText()

Shell script text.
To specify an interpreter, please add a `#!<interpreter>\n` at the
beginning of the text.(For example, to execute the script using bash,
`#!/bin/bash\n` should be added. To execute the script using`Python3`,
`#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
by default be excuted by `/bin/sh`.

`string text = 2;`

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