# Google Cloud Run V2 Client - Class SubmitBuildRequest (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class SubmitBuildRequest.

Request message for submitting a Build.

Generated from protobuf message `google.cloud.run.v2.SubmitBuildRequest`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or 'global' if the global builder is to be used. Format: `projects/{project}/locations/{location}` |
| `↳ storage_source` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.StorageSource` Required. Source for the build. |
| `↳ image_uri` | `string` Required. Artifact Registry URI to store the built image. |
| `↳ buildpack_build` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.BuildpacksBuild` Build the source using Buildpacks. |
| `↳ docker_build` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.DockerBuild` Build the source using Docker. This means the source has a Dockerfile. |
| `↳ service_account` | `string` Optional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used. |
| `↳ worker_pool` | `string` Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where `{project}` and `{region}` are the project id and region respectively where the worker pool is defined and `{workerPool}` is the short name of the worker pool. |
| `↳ tags` | `string[]` Optional. Additional tags to annotate the build. |
| `↳ machine_type` | `string` Optional. The machine type from default pool to use for the build. If left blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 is supported. If worker_pool is set, this field will be ignored. |
| `↳ release_track` | `int` Optional. The release track of the client that initiated the build request. |
| `↳ client` | `string` Optional. The client that initiated the build request. |

### getParent

Required. The project and location to build in. Location must be a region,
e.g., 'us-central1' or 'global' if the global builder is to be used.

Format:
`projects/{project}/locations/{location}`

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

### setParent

Required. The project and location to build in. Location must be a region,
e.g., 'us-central1' or 'global' if the global builder is to be used.

Format:
`projects/{project}/locations/{location}`

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

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

### getStorageSource

Required. Source for the build.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.StorageSource|null` |   |

### hasStorageSource

### setStorageSource

Required. Source for the build.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.StorageSource` |

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

### getImageUri

Required. Artifact Registry URI to store the built image.

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

### setImageUri

Required. Artifact Registry URI to store the built image.

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

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

### getBuildpackBuild

Build the source using Buildpacks.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.BuildpacksBuild|null` |   |

### hasBuildpackBuild

### setBuildpackBuild

Build the source using Buildpacks.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.BuildpacksBuild` |

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

### getDockerBuild

Build the source using Docker. This means the source has a Dockerfile.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.DockerBuild|null` |   |

### hasDockerBuild

### setDockerBuild

Build the source using Docker. This means the source has a Dockerfile.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.SubmitBuildRequest.DockerBuild` |

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

### getServiceAccount

Optional. The service account to use for the build. If not set, the default
Cloud Build service account for the project will be used.

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

### setServiceAccount

Optional. The service account to use for the build. If not set, the default
Cloud Build service account for the project will be used.

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

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

### getWorkerPool

Optional. Name of the Cloud Build Custom Worker Pool that should be used to
build the function. The format of this field is
`projects/{project}/locations/{region}/workerPools/{workerPool}` where
`{project}` and `{region}` are the project id and region respectively where
the worker pool is defined and `{workerPool}` is the short name of the
worker pool.

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

### setWorkerPool

Optional. Name of the Cloud Build Custom Worker Pool that should be used to
build the function. The format of this field is
`projects/{project}/locations/{region}/workerPools/{workerPool}` where
`{project}` and `{region}` are the project id and region respectively where
the worker pool is defined and `{workerPool}` is the short name of the
worker pool.

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

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

### getTags

Optional. Additional tags to annotate the build.

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

### setTags

Optional. Additional tags to annotate the build.

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

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

### getMachineType

Optional. The machine type from default pool to use for the build. If left
blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8
is supported. If worker_pool is set, this field will be ignored.

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

### setMachineType

Optional. The machine type from default pool to use for the build. If left
blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8
is supported. If worker_pool is set, this field will be ignored.

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

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

### getReleaseTrack

Optional. The release track of the client that initiated the build request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [LaunchStage](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.LaunchStage.html). |

### setReleaseTrack

Optional. The release track of the client that initiated the build request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [LaunchStage](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.LaunchStage.html). |

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

### getClient

Optional. The client that initiated the build request.

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

### setClient

Optional. The client that initiated the build request.

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

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

### getSource

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

### getBuildType

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