# Google Cloud Dataproc V1 Client - Class SoftwareConfig (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 SoftwareConfig.

Specifies the selection and config of software inside the cluster.

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

## Namespace

Google \\ Cloud \\ Dataproc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ image_version` | `string` Optional. The version of software inside the cluster. It must be one of the supported [Dataproc Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), such as "1.2" (including a subminor version, such as "1.2.29"), or the ["preview" version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version. |
| `↳ properties` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The properties to set on daemon config files. Property keys are specified in `prefix:property` format, for example `core:hadoop.tmp.dir`. The following are supported prefixes and their mappings: \* capacity-scheduler: `capacity-scheduler.xml` \* core: `core-site.xml` \* distcp: `distcp-default.xml` \* hdfs: `hdfs-site.xml` \* hive: `hive-site.xml` \* mapred: `mapred-site.xml` \* pig: `pig.properties` \* spark: `spark-defaults.conf` \* yarn: `yarn-site.xml` For more information, see [Cluster properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). |
| `↳ optional_components` | `array` Optional. The set of components to activate on the cluster. |

### getImageVersion

Optional. The version of software inside the cluster. It must be one of the
supported [Dataproc
Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
such as "1.2" (including a subminor version, such as "1.2.29"), or the
["preview"
version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).

If unspecified, it defaults to the latest Debian version.

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

### setImageVersion

Optional. The version of software inside the cluster. It must be one of the
supported [Dataproc
Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
such as "1.2" (including a subminor version, such as "1.2.29"), or the
["preview"
version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).

If unspecified, it defaults to the latest Debian version.

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

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

### getProperties

Optional. The properties to set on daemon config files.

Property keys are specified in `prefix:property` format, for example
`core:hadoop.tmp.dir`. The following are supported prefixes
and their mappings:

- capacity-scheduler: `capacity-scheduler.xml`
- core: `core-site.xml`
- distcp: `distcp-default.xml`
- hdfs: `hdfs-site.xml`
- hive: `hive-site.xml`
- mapred: `mapred-site.xml`
- pig: `pig.properties`
- spark: `spark-defaults.conf`
- yarn: `yarn-site.xml` For more information, see [Cluster
  properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).

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

### setProperties

Optional. The properties to set on daemon config files.

Property keys are specified in `prefix:property` format, for example
`core:hadoop.tmp.dir`. The following are supported prefixes
and their mappings:

- capacity-scheduler: `capacity-scheduler.xml`
- core: `core-site.xml`
- distcp: `distcp-default.xml`
- hdfs: `hdfs-site.xml`
- hive: `hive-site.xml`
- mapred: `mapred-site.xml`
- pig: `pig.properties`
- spark: `spark-defaults.conf`
- yarn: `yarn-site.xml` For more information, see [Cluster
  properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).

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

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

### getOptionalComponents

Optional. The set of components to activate on the cluster.

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

### setOptionalComponents

Optional. The set of components to activate on the cluster.

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

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