# Cloud Dataproc V1 API - Class Google::Cloud::Dataproc::V1::Batch (v1.16.0)

1.15.0 (latest) 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.0 1.1.0 1.0.2 0.26.0 0.25.0 0.24.1 0.23.1 0.22.0 0.21.0 0.20.0 0.19.0 0.18.1 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.7.1 Reference documentation and code samples for the Cloud Dataproc V1 API class Google::Cloud::Dataproc::V1::Batch.

A representation of a batch workload in the service.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time when the batch was created.

### #creator

    def creator() -> ::String

**Returns**

- (::String) --- Output only. The email address of the user who created the batch.

### #environment_config

    def environment_config() -> ::Google::Cloud::Dataproc::V1::EnvironmentConfig

**Returns**

- ([::Google::Cloud::Dataproc::V1::EnvironmentConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-EnvironmentConfig)) --- Optional. Environment configuration for the batch execution.

### #environment_config=

    def environment_config=(value) -> ::Google::Cloud::Dataproc::V1::EnvironmentConfig

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::EnvironmentConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-EnvironmentConfig)) --- Optional. Environment configuration for the batch execution.
**Returns**

- ([::Google::Cloud::Dataproc::V1::EnvironmentConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-EnvironmentConfig)) --- Optional. Environment configuration for the batch execution.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- 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**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the batch.

### #operation

    def operation() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the operation associated with this batch.

### #pyspark_batch

    def pyspark_batch() -> ::Google::Cloud::Dataproc::V1::PySparkBatch

**Returns**

- ([::Google::Cloud::Dataproc::V1::PySparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkBatch)) --- Optional. PySpark batch config.


  Note: The following fields are mutually exclusive: `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pyspark_batch=

    def pyspark_batch=(value) -> ::Google::Cloud::Dataproc::V1::PySparkBatch

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::PySparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkBatch)) --- Optional. PySpark batch config.


  Note: The following fields are mutually exclusive: `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dataproc::V1::PySparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkBatch)) --- Optional. PySpark batch config.


  Note: The following fields are mutually exclusive: `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pyspark_notebook_batch

    def pyspark_notebook_batch() -> ::Google::Cloud::Dataproc::V1::PySparkNotebookBatch

**Returns**

- ([::Google::Cloud::Dataproc::V1::PySparkNotebookBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkNotebookBatch)) --- Optional. PySpark notebook batch config.


  Note: The following fields are mutually exclusive: `pyspark_notebook_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #pyspark_notebook_batch=

    def pyspark_notebook_batch=(value) -> ::Google::Cloud::Dataproc::V1::PySparkNotebookBatch

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::PySparkNotebookBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkNotebookBatch)) --- Optional. PySpark notebook batch config.


  Note: The following fields are mutually exclusive: `pyspark_notebook_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dataproc::V1::PySparkNotebookBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-PySparkNotebookBatch)) --- Optional. PySpark notebook batch config.


  Note: The following fields are mutually exclusive: `pyspark_notebook_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `spark_sql_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #runtime_config

    def runtime_config() -> ::Google::Cloud::Dataproc::V1::RuntimeConfig

**Returns**

- ([::Google::Cloud::Dataproc::V1::RuntimeConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-RuntimeConfig)) --- Optional. Runtime configuration for the batch execution.

### #runtime_config=

    def runtime_config=(value) -> ::Google::Cloud::Dataproc::V1::RuntimeConfig

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::RuntimeConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-RuntimeConfig)) --- Optional. Runtime configuration for the batch execution.
**Returns**

- ([::Google::Cloud::Dataproc::V1::RuntimeConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-RuntimeConfig)) --- Optional. Runtime configuration for the batch execution.

### #runtime_info

    def runtime_info() -> ::Google::Cloud::Dataproc::V1::RuntimeInfo

**Returns**

- ([::Google::Cloud::Dataproc::V1::RuntimeInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-RuntimeInfo)) --- Output only. Runtime information about batch execution.

### #spark_batch

    def spark_batch() -> ::Google::Cloud::Dataproc::V1::SparkBatch

**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkBatch)) --- Optional. Spark batch config.


  Note: The following fields are mutually exclusive: `spark_batch`, `pyspark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #spark_batch=

    def spark_batch=(value) -> ::Google::Cloud::Dataproc::V1::SparkBatch

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::SparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkBatch)) --- Optional. Spark batch config.


  Note: The following fields are mutually exclusive: `spark_batch`, `pyspark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkBatch)) --- Optional. Spark batch config.


  Note: The following fields are mutually exclusive: `spark_batch`, `pyspark_batch`, `spark_r_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #spark_r_batch

    def spark_r_batch() -> ::Google::Cloud::Dataproc::V1::SparkRBatch

**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkRBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkRBatch)) --- Optional. SparkR batch config.


  Note: The following fields are mutually exclusive: `spark_r_batch`, `pyspark_batch`, `spark_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #spark_r_batch=

    def spark_r_batch=(value) -> ::Google::Cloud::Dataproc::V1::SparkRBatch

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::SparkRBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkRBatch)) --- Optional. SparkR batch config.


  Note: The following fields are mutually exclusive: `spark_r_batch`, `pyspark_batch`, `spark_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkRBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkRBatch)) --- Optional. SparkR batch config.


  Note: The following fields are mutually exclusive: `spark_r_batch`, `pyspark_batch`, `spark_batch`, `spark_sql_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #spark_sql_batch

    def spark_sql_batch() -> ::Google::Cloud::Dataproc::V1::SparkSqlBatch

**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkSqlBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkSqlBatch)) --- Optional. SparkSql batch config.


  Note: The following fields are mutually exclusive: `spark_sql_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #spark_sql_batch=

    def spark_sql_batch=(value) -> ::Google::Cloud::Dataproc::V1::SparkSqlBatch

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1::SparkSqlBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkSqlBatch)) --- Optional. SparkSql batch config.


  Note: The following fields are mutually exclusive: `spark_sql_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Dataproc::V1::SparkSqlBatch](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-SparkSqlBatch)) --- Optional. SparkSql batch config.


  Note: The following fields are mutually exclusive: `spark_sql_batch`, `pyspark_batch`, `spark_batch`, `spark_r_batch`, `pyspark_notebook_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #state

    def state() -> ::Google::Cloud::Dataproc::V1::Batch::State

**Returns**

- ([::Google::Cloud::Dataproc::V1::Batch::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-Batch-State)) --- Output only. The state of the batch.

### #state_history

    def state_history() -> ::Array<::Google::Cloud::Dataproc::V1::Batch::StateHistory>

**Returns**

- (::Array\<[::Google::Cloud::Dataproc::V1::Batch::StateHistory](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Cloud-Dataproc-V1-Batch-StateHistory)\>) --- Output only. Historical state information for the batch.

### #state_message

    def state_message() -> ::String

**Returns**

- (::String) --- Output only. Batch state details, such as a failure description if the state is `FAILED`.

### #state_time

    def state_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time when the batch entered a current state.

### #uuid

    def uuid() -> ::String

**Returns**

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