# Google Cloud Secure Source Manager V1 Client - Class CreateHookRequest (1.8.0)

1.8.0 (latest) 1.7.0 1.6.3 1.5.0 1.4.1 1.3.3 1.2.0 1.1.0 1.0.0 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Secure Source Manager V1 Client class CreateHookRequest.

CreateHookRequest is the request for creating a hook.

Generated from protobuf message `google.cloud.securesourcemanager.v1.CreateHookRequest`

## Namespace

Google \\ Cloud \\ SecureSourceManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The repository in which to create the hook. Values are of the form `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` |
| `↳ hook` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.Hook` Required. The resource being created. |
| `↳ hook_id` | `string` Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. |

### getParent

Required. The repository in which to create the hook. Values are of the
form
`projects/{project_number}/locations/{location_id}/repositories/{repository_id}`

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

### setParent

Required. The repository in which to create the hook. Values are of the
form
`projects/{project_number}/locations/{location_id}/repositories/{repository_id}`

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

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

### getHook

Required. The resource being created.

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

### hasHook

### clearHook

### setHook

Required. The resource being created.

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

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

### getHookId

Required. The ID to use for the hook, which will become the final component
of the hook's resource name. This value restricts to lower-case letters,
numbers, and hyphen, with the first character a letter, the last a letter
or a number, and a 63 character maximum.

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

### setHookId

Required. The ID to use for the hook, which will become the final component
of the hook's resource name. This value restricts to lower-case letters,
numbers, and hyphen, with the first character a letter, the last a letter
or a number, and a 63 character maximum.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The repository in which to create the hook. Values are of the form `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` Please see SecureSourceManagerClient::repositoryName() for help formatting this field. |
| `hook` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.Hook` Required. The resource being created. |
| `hookId` | `string` Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. |

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