# Google Cloud Dataproc V1 Client - Class Batch (3.14.0)

3.14.0 (latest) 3.13.4 3.12.0 3.11.0 3.10.1 3.9.0 3.8.1 3.7.1 3.6.1 3.5.1 3.4.0 3.3.0 3.2.2 2.12.0 2.11.0 2.10.0 2.9.1 2.8.2 2.7.0 2.6.1 2.5.0 2.3.0 2.2.3 2.1.0 2.0.0 Reference documentation and code samples for the Google Cloud Dataproc V1 Client class Batch.

A representation of a batch workload in the service.

Generated from protobuf message `google.cloud.dataproc.v1.Batch`

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of the batch. |
| `↳ uuid` | `string` Output only. A batch UUID (Unique Universal Identifier). The service generates this value when it creates the batch. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the batch was created. |
| `↳ pyspark_batch` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.PySparkBatch` Optional. PySpark batch config. |
| `↳ spark_batch` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkBatch` Optional. Spark batch config. |
| `↳ spark_r_batch` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkRBatch` Optional. SparkR batch config. |
| `↳ spark_sql_batch` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkSqlBatch` Optional. SparkSql batch config. |
| `↳ runtime_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeInfo` Output only. Runtime information about batch execution. |
| `↳ state` | `int` Output only. The state of the batch. |
| `↳ state_message` | `string` Output only. Batch state details, such as a failure description if the state is `FAILED`. |
| `↳ state_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the batch entered a current state. |
| `↳ creator` | `string` Output only. The email address of the user who created the batch. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The labels to associate with this batch. 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 batch. |
| `↳ runtime_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeConfig` Optional. Runtime configuration for the batch execution. |
| `↳ environment_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.EnvironmentConfig` Optional. Environment configuration for the batch execution. |
| `↳ operation` | `string` Output only. The resource name of the operation associated with this batch. |
| `↳ state_history` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.Batch.StateHistory>` Output only. Historical state information for the batch. |

### getName

Output only. The resource name of the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The resource name of the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUuid

Output only. A batch UUID (Unique Universal Identifier). The service
generates this value when it creates the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUuid

Output only. A batch UUID (Unique Universal Identifier). The service
generates this value when it creates the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time when the batch was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the batch was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPysparkBatch

Optional. PySpark batch config.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.PySparkBatch|null` |   |

### hasPysparkBatch

### setPysparkBatch

Optional. PySpark batch config.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.PySparkBatch` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSparkBatch

Optional. Spark batch config.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkBatch|null` |   |

### hasSparkBatch

### setSparkBatch

Optional. Spark batch config.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkBatch` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSparkRBatch

Optional. SparkR batch config.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkRBatch|null` |   |

### hasSparkRBatch

### setSparkRBatch

Optional. SparkR batch config.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkRBatch` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSparkSqlBatch

Optional. SparkSql batch config.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkSqlBatch|null` |   |

### hasSparkSqlBatch

### setSparkSqlBatch

Optional. SparkSql batch config.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.SparkSqlBatch` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRuntimeInfo

Output only. Runtime information about batch execution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeInfo|null` |   |

### hasRuntimeInfo

### clearRuntimeInfo

### setRuntimeInfo

Output only. Runtime information about batch execution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The state of the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setState

Output only. The state of the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStateMessage

Output only. Batch state details, such as a failure
description if the state is `FAILED`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setStateMessage

Output only. Batch state details, such as a failure
description if the state is `FAILED`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStateTime

Output only. The time when the batch entered a current state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasStateTime

### clearStateTime

### setStateTime

Output only. The time when the batch entered a current state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreator

Output only. The email address of the user who created the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCreator

Output only. The email address of the user who created the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Optional. The labels to associate with this batch.

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 batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Optional. The labels to associate with this batch.

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 batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRuntimeConfig

Optional. Runtime configuration for the batch execution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeConfig|null` |   |

### hasRuntimeConfig

### clearRuntimeConfig

### setRuntimeConfig

Optional. Runtime configuration for the batch execution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.RuntimeConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEnvironmentConfig

Optional. Environment configuration for the batch execution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.EnvironmentConfig|null` |   |

### hasEnvironmentConfig

### clearEnvironmentConfig

### setEnvironmentConfig

Optional. Environment configuration for the batch execution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.EnvironmentConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOperation

Output only. The resource name of the operation associated with this batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setOperation

Output only. The resource name of the operation associated with this batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStateHistory

Output only. Historical state information for the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/RepeatedField` |   |

### setStateHistory

Output only. Historical state information for the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.Batch.StateHistory>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBatchConfig

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |