# Cloud Scheduler V1 Client - Class CreateJobRequest (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.10.5 1.9.4 1.8.3 1.7.1 1.6.8 Reference documentation and code samples for the Cloud Scheduler V1 Client class CreateJobRequest.

Request message for
[CreateJob](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Client.CloudSchedulerClient#_Google_Cloud_Scheduler_V1_Client_CloudSchedulerClient__createJob__).

Generated from protobuf message `google.cloud.scheduler.v1.CreateJobRequest`

## Namespace

Google \\ Cloud \\ Scheduler \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. |
| `↳ job` | `https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job` Required. The job to add. The user can optionally specify a name for the job in [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__). [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__) cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__)) in the response. |

### getParent

Required. The location name. For example:
`projects/PROJECT_ID/locations/LOCATION_ID`.

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

### setParent

Required. The location name. For example:
`projects/PROJECT_ID/locations/LOCATION_ID`.

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

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

### getJob

Required. The job to add. The user can optionally specify a name for the
job in [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__).

[name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__) cannot be the same as an
existing job. If a name is not specified then the system will
generate a random unique name that will be returned
([name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__)) in the response.

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

### hasJob

### clearJob

### setJob

Required. The job to add. The user can optionally specify a name for the
job in [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__).

[name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__) cannot be the same as an
existing job. If a name is not specified then the system will
generate a random unique name that will be returned
([name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__)) in the response.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`. Please see CloudSchedulerClient::locationName() for help formatting this field. |
| `job` | `https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job` Required. The job to add. The user can optionally specify a name for the job in [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__). [name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__) cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.Job#_Google_Cloud_Scheduler_V1_Job__getName__)) in the response. |

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