# Google Cloud Container V1 Client - Class SwapConfig (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class SwapConfig.

Configuration for swap memory on a node pool.

Generated from protobuf message `google.container.v1.LinuxNodeConfig.SwapConfig`

## Namespace

Google \\ Cloud \\ Container \\ V1 \\ LinuxNodeConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enabled` | `bool` Optional. Enables or disables swap for the node pool. |
| `↳ encryption_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EncryptionConfig` Optional. If omitted, swap space is encrypted by default. |
| `↳ boot_disk_profile` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.BootDiskProfile` Swap on the node's boot disk. |
| `↳ ephemeral_local_ssd_profile` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EphemeralLocalSsdProfile` Swap on the local SSD shared with pod ephemeral storage. |
| `↳ dedicated_local_ssd_profile` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.DedicatedLocalSsdProfile` Provisions a new, separate local NVMe SSD exclusively for swap. |

### getEnabled

Optional. Enables or disables swap for the node pool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnabled

### clearEnabled

### setEnabled

Optional. Enables or disables swap for the node pool.

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

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

### getEncryptionConfig

Optional. If omitted, swap space is encrypted by default.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EncryptionConfig|null` |   |

### hasEncryptionConfig

### clearEncryptionConfig

### setEncryptionConfig

Optional. If omitted, swap space is encrypted by default.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EncryptionConfig` |

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

### getBootDiskProfile

Swap on the node's boot disk.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.BootDiskProfile|null` |   |

### hasBootDiskProfile

### setBootDiskProfile

Swap on the node's boot disk.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.BootDiskProfile` |

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

### getEphemeralLocalSsdProfile

Swap on the local SSD shared with pod ephemeral storage.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EphemeralLocalSsdProfile|null` |   |

### hasEphemeralLocalSsdProfile

### setEphemeralLocalSsdProfile

Swap on the local SSD shared with pod ephemeral storage.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.EphemeralLocalSsdProfile` |

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

### getDedicatedLocalSsdProfile

Provisions a new, separate local NVMe SSD exclusively for swap.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.DedicatedLocalSsdProfile|null` |   |

### hasDedicatedLocalSsdProfile

### setDedicatedLocalSsdProfile

Provisions a new, separate local NVMe SSD exclusively for swap.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig.DedicatedLocalSsdProfile` |

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

### getPerformanceProfile

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