# Google Cloud OsConfig V1 Client - Class CreatePatchDeploymentRequest (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class CreatePatchDeploymentRequest.

A request message for creating a patch deployment.

Generated from protobuf message `google.cloud.osconfig.v1.CreatePatchDeploymentRequest`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The project to apply this patch deployment to in the form `projects/*`. |
| `↳ patch_deployment_id` | `string` Required. A name for the patch deployment in the project. When creating a name the following rules apply: \* \* Must contain only lowercase letters, numbers, and hyphens. \* \* Must start with a letter. \* \* Must be between 1-63 characters. \* \* Must end with a number or a letter. \* \* Must be unique within the project. |
| `↳ patch_deployment` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.PatchDeployment` Required. The patch deployment to create. |

### getParent

Required. The project to apply this patch deployment to in the form
`projects/*`.

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

### setParent

Required. The project to apply this patch deployment to in the form
`projects/*`.

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

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

### getPatchDeploymentId

Required. A name for the patch deployment in the project. When creating a
name the following rules apply:

- Must contain only lowercase letters, numbers, and hyphens.

- Must start with a letter.

- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the project.

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

### setPatchDeploymentId

Required. A name for the patch deployment in the project. When creating a
name the following rules apply:

- Must contain only lowercase letters, numbers, and hyphens.

- Must start with a letter.

- Must be between 1-63 characters.
- Must end with a number or a letter.
- Must be unique within the project.

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

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

### getPatchDeployment

Required. The patch deployment to create.

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

### hasPatchDeployment

### clearPatchDeployment

### setPatchDeployment

Required. The patch deployment to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project to apply this patch deployment to in the form `projects/*`. Please see OsConfigServiceClient::projectName() for help formatting this field. |
| `patchDeployment` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.PatchDeployment` Required. The patch deployment to create. |
| `patchDeploymentId` | `string` Required. A name for the patch deployment in the project. When creating a name the following rules apply: - Must contain only lowercase letters, numbers, and hyphens. - Must start with a letter. - Must be between 1-63 characters. - Must end with a number or a letter. - Must be unique within the project. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.CreatePatchDeploymentRequest` |   |